Socket
Socket
Sign inDemoInstall

exoplatform-api-wrapper

Package Overview
Dependencies
0
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    exoplatform-api-wrapper

An eXo Platform Social REST API wrapper 🧐


Version published
Weekly downloads
9
Maintainers
1
Install size
59.2 kB
Created
Weekly downloads
 

Readme

Source

exoplatform-api-wrapper

npm badge Build Status

A wrapper for the API of the Open source Enterprise Social Network of eXo Platform. It covers the Social REST API, which is badly documented.

It is entirely built from TypeScript and fully tested. API responses are typed, so you can get full auto-completion in your code editor.

This project is dependency-free.

Install

yarn add exoplatform-api-wrapper
# or
npm i exoplatform-api-wrapper

Usage

The example below shows how to get activities available in a user's feed.

import ExoPlatformWrapper from 'exoplatform-api-wrapper'

const setup = async () => {
  const exoWrapper = new ExoPlatformWrapper('www.example.com')
  await exoWrapper.login('myUsername', 'myPassword')
  const { activities } = await exoWrapper.user.readStream()
  console.log(activities)
}

setup()

Documentation

See rigwild.github.io/exoplatform-api-wrapper.

Full API coverage/example is available in the automated tests: ./test/tests.ts.

Running tests

You must configure the tests by setting the following environment variables.

Environment variableDescriptionRequiredDefaultExample
EXO_HOSTNAMEeXo Platform social network hostname (no protocol://)www.example.com
EXO_PATHeXo Platform API path/rest/exo/platform/rest
EXO_USERNAMEeXo Platform account usernamemyUser
EXO_PASSWORDeXo Platform account passwordmyPassword
EXO_SECURE_PROTOCOLSSL protocol to use (do not touch if you don't know what it is!!)undefinedTLSv1_method
EXO_CIPHERSSSL ciphers to use (do not touch if you don't know what it is!!)undefinedAES128-SHA

Then, you can run the tests:

yarn test
# or
npm run test

Notice

The author of this library is not affiliated in any way with eXo Platform.

Contributing

If you found a bug or want any features not available yet, feel free to open an issue documentating the problem.

You may also contribute to the project by opening a Pull Request.

License

The MIT license

Keywords

FAQs

Last updated on 29 Aug 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc