Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@orbit-love/members

Package Overview
Dependencies
Maintainers
2
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orbit-love/members

Orbit API client for Node.js. API support for member operations.

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Orbit Members Helper Library for Node.js

Build Status npm version Contributor Covenant

Orbit API helper library for Node.js.
This client can create, read, update and delete members and identities in your Orbit workspace.

Orbit

Installation

npm install @orbit-love/members

Constructor

const OrbitMembers = require('@orbit-love/members')
const orbitMembers = new OrbitMembers(orbitWorkspaceId, orbitApiKey)
  • orbitWorkspaceId - The part of your Orbit workspace URL that immediately follows the app.orbit.love. For example, if the URL was https://app.orbit.love/my-workspace, then your Orbit workspace ID is my-workspace.
  • orbitApiKey - This can be found in you Orbit Account Settings.

Initializing with environment variables

If you have the environment variables ORBIT_WORKSPACE_ID and ORBIT_API_KEY set, you can initialize the client like so:

const OrbitMembers = require('@orbit-love/members')
const orbitMembers = new OrbitMembers()

If you have environment variables set and also pass in values, the passed in values will be used.

Rate Limits & Page Sizes

Methods

listMembers(query)
const query = {
    page: 1,
    items: 50,
    company: 'ACME Corp'
}

orbitMembers.listMembers(query).then(data => {
    console.log(data)
}).catch(error => {
    console.error(error)
})

options is not a required parameter, but can include any query parameter shown in our API reference.

List members in a workspace API reference

getMember(memberId)
const memberId = 'janesmith04'

getMember(memberId).then(data => {
    console.log(data)
}).catch(error => {
    console.error(error)
})

Get a member API reference

findMember(query)
const query = {
    source: 'youtube',
    username: 'janesmith1990'
}

orbitMembers.findMember(query).then(data => {
    console.log(data)
}).catch(error => {
    console.error(error)
})

Provide a source and one of username/uid/email params to return a member with that identity, if one exists. Common values for source include github, twitter, and email.

Fine a member by an identity API reference

createMember(data)
const data = {
    member: {
        twitter: 'janesmith_',
        name: 'jane Smith',
        tags: ['champion', 'feedback']
    }
}

orbitMembers.createMember(data).then(data => {
    console.log(data)
}).catch(error => {
    console.error(error)
})

Create a member API reference

updateMember([memberId], data)
const memberId = 'janesmith04'
const data = {
    bio: 'New bio'
}

orbitMembers.updateMember(memberId, data).then(data => {
    console.log(data)
}).catch(error => {
    console.error(error)
})

You can omit memberId and provide only the data object, but you must then provide an identity object.

Update a member with memberID API Reference

Update a member without memberId API reference

deleteMember(memberId)
const memberId = 'janesmith04'

orbitMembers.deleteMember(memberId).then(data => {
    console.log(data)
}).catch(error => {
    console.error(error)
})

Delete a member API reference

addIdentity(memberId, data)
const memberId = 'janesmith04'
const data = {
    source: 'youtube',
    username: 'janesmith1990'
}

orbitMembers.addIdentity(memberId, data).then(data => {
    console.log(data)
}).catch(error => {
    console.error(error)
})
removeIdentity(memberId, data)
const memberId = 'janesmith04'
const data = {
    source: 'youtube',
    username: 'janesmith1990'
}

orbitMembers.removeIdentity(memberId, data).then(data => {
    console.log(data)
}).catch(error => {
    console.error(error)
})

Contributing

We 💜 contributions from everyone! Check out the Contributing Guidelines for more information.

License

This is available as open source under the terms of the MIT License.

Code of Conduct

This project uses the Contributor Code of Conduct. We ask everyone to please adhere by its guidelines.

Keywords

FAQs

Package last updated on 17 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc