SwiftyConnect - Steemconnect for iOS - Helper Class & More Unit Tests

in utopian-io •  7 years ago  (edited)

swifty.png

SwiftyConnect v.0.1.5

V.0.1.5 added a new Helper Class, which purpose is to present - mostly - needed code snippets and calculations for your Steem iOS application. The first version of it provides 4 basic functions which are:

  • calculateSteempower
    Only needs the vestingShares of a user account, it fetches the global properties itself. It returns always a callback(error, steempower)

  • getVotingPower
    Needs the voting power of an user and the last voting time (both can be found via getAccounts), it calculates the currently voting power percentage out of it.

  • createCommentPermlink
    Can be used to create comment permlinks (e.g re-moonrise-hello-{timestamp})

  • reputation
    Converts the reputation into an readable state

  • Full Function Names:

public func calculateSteempower(vestingShares: String, callback:((Any?, Float?) -> Void)?)

public func getVotingPower(votingPower: Int, lastVoteTime: String) -> Double

public func createCommentPermlink(parentAuthor: String, parentPermlink: String) -> String

public func reputation(rawReputation: Double) -> Double

Unit Tests

The other part of V.0.1.5 was to increase the unit tests up to ~80%, meaning the next release will provide a 100% tested API and Library.

Missing Unit Tests are mostly for transactions, witnesses API endpoints. The more needed ones are all tested and should work.

Using the new advanced logo

SwiftyConnect also uses now the new advanced logo by @radudangratin

Installation

Carthage

github "caspernikus/SwiftyConnect" ~> 0.1.5

(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 API Unit Tests
    • Full API Documentation
  • V1.0:
    • Full Documentation
    • 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 mine 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:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @moonrise I am @utopian-io. I have just upvoted you!

Achievements

  • You have less than 500 followers. Just gave you a gift to help you succeed!
  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

You have no idea how much some people(me) have wanted this. Thank you so much.

I seem to get an error when using it. After I authorize myself through steemconnect on safari and get back into the app, I get this error:
Screen Shot 2018-04-08 at 10.54.48 PM.png
Do you know how to fix that?

  ·  7 years ago (edited)

Hey man,
contact me via discord of steemconnect. My name is also moonrise.

Ps: I do not see any initialization of steem. (eg let steem = Steem.sharedInstance)

I still get the same error even after adding that to the app delegate. (Its was previously globally declared) Can you link me to the steemconnect discord?

https://discord.gg/G95rNZs

Then write moonrise a private message :)

sir, i want to create bid upvote bot. but i am not java scrypt user. but i can try. can you please guide me with your js flow for bid upvote bot. no i start reading your post ( TUTORIAL - Beginner - Build your own Steem Upvote Bot - JavaScript - Part 1 ) i don't know where to start. i am not js user. I am waiting your reply sir. thank you

Hey man,
I highly recommend you to first learn the basics of JavaScript before starting with an node js Bot.
I am quite an old head since I started programming with 11 years - I don’t know what tutorials a new and good. But checkout codeacademy and medium for js tutorials.

My advice is start with something easy you want to do: like a simple Website / calculator / or a function which detect prime numbers.

Thank you sir, I will try first about JavaScript in codeacademy. After that i will come to you again sir :) please guide me again. Thanks alot

Can you please make a video tutorial for me?

I don’t think you have learnt the basics of JavaScript in 11 hrs :)

I can make a video tutorial, but it would take a while. I am currently in the hospital.
The better option is that you lesrn JavaScript via medium / other platforms