Skip to content

Commit

Permalink
Hotfix 0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
enmerk4r committed Nov 16, 2021
1 parent 710b592 commit 94b96a6
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 3 deletions.
Binary file added Assets/swiftlet_examples.gh
Binary file not shown.
29 changes: 29 additions & 0 deletions Swiftlet/Components/2_Request/CreateTextBody.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using GH_IO.Serialization;
using Grasshopper.Kernel;
using Rhino.Geometry;
using Swiftlet.DataModels.Enums;
Expand Down Expand Up @@ -33,6 +34,34 @@ public CreateTextBody()
this.IsJsonChecked = true;
}

public override bool Read(GH_IReader reader)
{
this.IsTextChecked = reader.GetBoolean(nameof(this.IsTextChecked));
this.IsJavascriptChecked = reader.GetBoolean(nameof(this.IsJavascriptChecked));
this.IsJsonChecked = reader.GetBoolean(nameof(this.IsJsonChecked));
this.IsHtmlChecked = reader.GetBoolean(nameof(this.IsHtmlChecked));
this.IsXmlChecked = reader.GetBoolean(nameof(this.IsXmlChecked));

if (this.IsTextChecked) _cType = ContentType.Text;
else if (this.IsJavascriptChecked) _cType = ContentType.JavaScript;
else if (this.IsJsonChecked) _cType = ContentType.JSON;
else if (this.IsHtmlChecked) _cType = ContentType.HTML;
else if (this.IsXmlChecked) _cType = ContentType.XML;

this.Message = this._cType.ToString();
return base.Read(reader);
}

public override bool Write(GH_IWriter writer)
{
writer.SetBoolean(nameof(this.IsTextChecked), this.IsTextChecked);
writer.SetBoolean(nameof(this.IsJavascriptChecked), this.IsJavascriptChecked);
writer.SetBoolean(nameof(this.IsJsonChecked), this.IsJsonChecked);
writer.SetBoolean(nameof(this.IsHtmlChecked), this.IsHtmlChecked);
writer.SetBoolean(nameof(this.IsXmlChecked), this.IsXmlChecked);
return base.Write(writer);
}

/// <summary>
/// Registers all the input parameters for this component.
/// </summary>
Expand Down
4 changes: 2 additions & 2 deletions Swiftlet/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.1.0.0")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyVersion("0.1.1.0")]
[assembly: AssemblyFileVersion("0.1.1.0")]
Binary file added Yak/dist-0.1.1/Swiftlet.gha
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: swiftlet
version: 0.1.0
version: 0.1.1
authors:
- Sergey Pigach
description: >
Expand All @@ -19,4 +19,6 @@ keywords:
- scraping
- endpoint
- headers
- http
- https
icon_url: "https://swiftlet.s3.us-east-2.amazonaws.com/Logo_32x32.png"
Binary file added Yak/dist-0.1.1/swiftlet-0.1.1-rh6_35-any.yak
Binary file not shown.
Binary file added Yak/dist-0.1.1/swiftlet-0.1.1-rh7_0-any.yak
Binary file not shown.

0 comments on commit 94b96a6

Please sign in to comment.