/ng2-poet

wrapper of poets frost in angular 2

Primary LanguageJavaScript

Angular 2 library to interact with Po.et ' s Frost API





Installation

To install this library, run:

$ npm install ng2-poet --save

Import

Import PoetModule for usage and inject the FrostService

import { PoetModule, FrostService} from 'ng2-poet'


@NgModule({
  imports: [
    PoetModule
  ],
  providers: [FrostService],
})

There are also available models :

import { WorkAttributes, Work, Account, Profile} from 'ng2-poet'

Methodes

You need an Api token to add work to the poet network.

Get a Api token via direct register https://frost.po.et or use the methode below

CreateAccount(account: Account)

You can set a token firstly to avoid recalls on every methode

setToken(token: string)

Create a work

CreateWork(work: WorkAttributes, token(optional))

Get a single work by workId

 GetWork(workId: string, token(optional))

Get all works of your api Token

GetWorks(token(optional))

License

MIT © Nokol.net