SwiftyConnect - Steemconnect for iOS - Added Comment_Options / Delete_Comment

Words
228
Reading
2 min
Listen
Play
8y

wallpaper.png

SwiftyConnect

What feature(s) did you add?

SwiftyConnects update to version 0.1.7 is a really small update with 2 points in focus.

Number 1 was to add the missing comment_options and delete_comment broadcasting actions SteemConnect provides. They were honestly forgotten by myself and quickly added, since they are needed.

    public func commentOptions(author : String, permlink: String, maxAcceptedPayout: String?, percentSteemDollars: Int?, allowVotes : Bool, allowCurationRewards : Bool, extensions: NSDictionary?, completion:((JSONString) -> Void)?) 
    
    public func commentDelete(author : String, permlink: String, completion:((JSONString) -> Void)?)

In case you decide to set maxAcceptedPayout, percentSteemDollars or extensions to nil, default values are used !

extensions
Should be used the same way as they are used in SteemJS.

Number 2 was changing my exit-early if-clauses to the preferred Swift way -> guard.
Guard is pretty much an if-else clause in one line, or a better and easier version for exit-earlys.

If you want to find more about guard - click here

How did you implement it/them?

Using Guard instead of If-Clauses were done by this commit

Adding comment_options / delete_comment were done by this commit

Installation

Carthage

github "caspernikus/SwiftyConnect" ~> 0.1.7

(When building SwiftyConnect the lib OAuth2 is also builded, there is no need to add OAuth2 inside your project, since SwiftyConenct contains OAuth2!)

Roadmap

  • V0.2:
    • Full Code Documentation
  • V1.0:
    • More Helper Class Functions
    • Transactions Sending / Receiving
    • Signing

How to contribute?

Create Pull Requests

GitHub Link

Proof for GitHub

Please visit my last contribution here, to see that benediktveith is also my account !



Posted on Utopian.io - Rewarding Open Source Contributors

SwiftyConnect - Steemconnect for iOS - Added Comment_Options / Dele... | Ecency