SwiftyConnect - Steemconnect for iOS - Added Comment_Options / Delete_Comment

in utopian-io •  7 years ago  (edited)

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

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Thanks for the contribution. It has been approved.


Need help? Write a ticket on https://support.utopian.io.
Chat with us on Discord.

[utopian-moderator]

Hey @moonrise! Thank you for the great work you've done!

We're already looking forward to your next contribution!

Fully Decentralized Rewards

We hope you will take the time to share your expertise and knowledge by rating contributions made by others on Utopian.io to help us reward the best contributions together.

Utopian Witness!

Vote for Utopian Witness! We are made of developers, system administrators, entrepreneurs, artists, content creators, thinkers. We embrace every nationality, mindset and belief.

Want to chat? Join us on Discord https://discord.me/utopian-io

Congratulations @moonrise! You have completed some achievement on Steemit and have been rewarded with new badge(s) :

Award for the total payout received

Click on any badge to view your own Board of Honor on SteemitBoard.
For more information about SteemitBoard, click here

If you no longer want to receive notifications, reply to this comment with the word STOP

Upvote this notification to help all Steemit users. Learn why here!