0.1.38 • Published 5 years ago

subby.js v0.1.38

Weekly downloads
-
License
-
Repository
-
Last release
5 years ago

Javascript API for Subby

More docs will be added soon...

Getting Started

npm install --save subby.js

Example

const subbyJs = require('subby.js')

;(async () => {
  await subbyJs.init({mnemonic: 'radar blur cabbage chef fix engine embark joy scheme fiction master release'})

  const profile = await subbyJs.getProfile('john')
  console.log(profile)
  
  const res = await subbyJs.getPostsFromPublisher('john', {limit: 10})
  console.log(res)
})()

API

  • donate: async ({account, amount, text, postId}) => {…}
  • editProfile: async ({username, bio, thumbnail, hideDonations, minimumTextDonation}) => {…}
  • getAddress: async () => {…}
  • getPostFromId: async ({publisher, id}) => {…}
  • getPostsFromIds: async (posts) => {…}
  • getPostsFromPublisher: async (publisher, {startAt = 0, limit = 50} = {}) => {…}
  • getPostsFromPublishers: async (publishers, {startAt = 0, limit = 50, cache} = {}) => {…}
  • getProfile: async (account) => {…}
  • getProfiles: async (accounts) => {…}
  • getSignerNetwork: () => {…}
  • getSubscriptions: async (account) => {…}
  • init: async ({provider, mnemonic, mnemonicAccountNumber = 0, privateKey} = {}) => {…}
  • mockSmartContracts: (subby, {mockSigner = true} = {}) => {…}
  • onDonation: (options, cb) => {…}
  • onPost: (options, cb) => {…}
  • onSignerChange: (cb) => {…}
  • publish: async ({link, comment}) => {…}
  • syncSubscriptions: async (subscriptions) => {…}
  • terminateAccount: async () => {…}

Tests

Subby.js uses Jest for automated tests

git clone https://github.com/subby-dapp/subby.js && cd subby.js
npm install
npm test
0.1.38

5 years ago

0.1.37

5 years ago

0.1.36

5 years ago

0.1.35

5 years ago

0.1.34

5 years ago

0.1.33

5 years ago

0.1.32

5 years ago

0.1.31

5 years ago

0.1.30

5 years ago

0.1.29

5 years ago

0.1.28

5 years ago

0.1.27

5 years ago

0.1.26

5 years ago

0.1.25

5 years ago

0.1.24

5 years ago

0.1.23

5 years ago

0.1.22

5 years ago

0.1.21

5 years ago

0.1.20

5 years ago

0.1.19

5 years ago

0.1.18

5 years ago

0.1.17

6 years ago

0.1.16

6 years ago

0.1.15

6 years ago

0.1.14

6 years ago

0.1.13

6 years ago

0.1.12

6 years ago

0.1.11

6 years ago

0.1.10

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago