Utopian SDK Typescript rebase

in utopian-io •  7 years ago  (edited)

Screen Shot 2018-01-17 at 5.42.50 AM.png

- What is the project about?
This project is a rewritten version of the Utopian API NPM package made by Nico Wehmöller but whith the support of Typescript out of the box.

- Differences
One of the main difference between the original one and this version is that this one is dependencies free! You do not need to rely in third party libraries to actually use the library. The advantage of this is that is one day one of the third party library get deprecated or it has a security bug, the code should be rebased.

- Benefits

  1. Zero dependencies
  2. More support into JS variants
  3. Typings for code completion in Typescript
  4. Third-party deprecation free

- Roadmap

  1. Implement more methods
  2. Rebase the code into one class with all the methods, so we can have an import like: import { UtopianSdk } from 'utopian-sdk-ts';
  3. Write a wiki of the methods in the library
  4. Finish writing the mocha tests to ensure functionality

How to use?


Using this library is just simple as the original one. So, I wrote a detailed-friendly steps on how to use it.

How to install


To install the library, you should only run the following command:

npm install utopian-api-ts --save

Javascript Example


In javascript, you just need to require the library and you can start using it right away.

var utopiansdk = require('utopian-api-ts');
utopiansdk.getModerators(function(data) {
    console.log(data);
});

Typescript Example


For Typescript, import the library as a variable.

import * as utopiansdk from 'utopian-api-ts';
utopiansdk.getModerators((data) => {
    console.log(data);
});

AMD Example


And in an AMD environment, it can be used the following way:

define(function(require,exports,module){
  var utopiansdk = require('utopian-api-ts');
});

Contributors


Contributors can get started by making a fork of my repo utopian-api-typescript, checkout a new branch, edit, commit, and make a pull request.

git clone https://github.com/<YOUR-USERNAME>/utopian-api-typescript
cd ./utopian-api-typescript
git checkout -b <new-branch>
...
git add -A
git commit -<BRANCH-NAME> "changes"
git push origin <BRANCH-NAME>

Then make a pull request.



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:  

Hey @jaysermendez 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

Thank you for the contribution. It has been approved. Its good to see you have listed out the benefits of your version with the earlier version.

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

Learning from my errors made me a better contributor :)