M O O N R I S E avatar

SwiftyConnect - Steemconnect for iOS - Added Comment_Options / Delete_Comment

moonrise

Published: 26 Apr 2018 › Updated: 26 Apr 2018SwiftyConnect - Steemconnect for iOS - Added Comment_Options / Delete_Comment

SwiftyConnect - Steemconnect for iOS - Added Comment_Options / Delete_Comment

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

Leave SwiftyConnect - Steemconnect for iOS - Added Comment_Options / Delete_Comment to:

Written by

<3 Music & Programming & More <3

Read more #utopian-io posts


Best Posts From M O O N R I S E

We have not curated any of moonrise's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.

More Posts From M O O N R I S E