Utopian SDK Typescript rebase

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//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

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center