Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
plasma-membership-api-client-js
Advanced tools
Readme
Kind: global class
Array
Array
Array
Array
Object
Object
Object
Object
Bool
Promise
Memberships API JS client.
In order to use Memberships API you should create an instance of this class.
import Memberships from "tm-memberships-api-client-js";
const products = new Memberships ('http://service-memberships.dev/api/v1', 'en');
Array
Return list of membership groups.
Kind: instance method of Memberships
Returns: Array
-
[ { "id":"1", "name":"Name", "active_icon":"http://s3.amazonaws.com/doc/2017-02-02/", "inactive_icon":"http://s3.amazonaws.com/doc/2017-02-02/", "type_id":"17763", }, ...]
Param | Type | Description |
---|---|---|
params | Object | Membership groups parameters { type_id: Number } |
Array
Return list of all membership plans.
Kind: instance method of Memberships
Returns: Array
-
[ { "id":"1", "title":"Premium", "descriptions":"Example description", "group_id":"1", "price": 199, "max_downloads":"10", "duration_days":"30", }, ...]
Param | Type | Description |
---|---|---|
params | Object | Membership group parameters { group_id: Number } |
Array
Return membership plan by id.
Kind: instance method of Memberships
Returns: Array
-
{ "id":"1", "title":"Premium", "descriptions":"Example description", "group_id":"1", "price": 199, "max_downloads":"10", "duration_days":"30", }
Param | Type | Description |
---|---|---|
params | number | id |
Array
Return list of subscriptions .
Kind: instance method of Memberships
Returns: Array
-
[ { "id":"1", "membership": { "id":"1", "title":"Premium", "descriptions":"Example description", "group_id":"1", "price": 199, "max_downloads":"10", "duration_days":"30", }, "user_id":"12345", "status":"active" "end_date":"1038444", "downloads":"0", "downloads_quota": 100, }, ...]
Param | Type | Description |
---|---|---|
token | String | User token |
params | Object | Membership groups parameters { status : String, membership_id : Number, group_id : Number } |
Object
Return subscription .
Kind: instance method of Memberships
Returns: Object
-
{ "id":"1", "membership": { "id":"1", "title":"Premium", "descriptions":"Example description", "group_id":"1", "price": 199, "max_downloads":"10", "duration_days":"30", }, "user_id":"12345", "status":"active" "end_date":"1038444", "downloads":"0", "downloads_quota": 100, }
Param | Type | Description |
---|---|---|
token | String | User token |
id | Number | User id |
Object
Reactivate payments
Kind: instance method of Memberships
Returns: Object
-
{ "id":"1", "membership": { "id":"1", "title":"Premium", "descriptions":"Example description", "group_id":"1", "price": 199, "max_downloads":"10", "duration_days":"30", }, "user_id":"12345", "status":"active" "end_date":"1038444", "downloads":"0", "downloads_quota": 100, "payment_status": active, }
Param | Type | Description |
---|---|---|
token | String | User token |
id | Number | Membership subscription id |
Object
Suspend payments
Kind: instance method of Memberships
Returns: Object
-
{ "id":"1", "membership": { "id":"1", "title":"Premium", "descriptions":"Example description", "group_id":"1", "price": 199, "max_downloads":"10", "duration_days":"30", }, "user_id":"12345", "status":"active" "end_date":"1038444", "downloads":"0", "downloads_quota": 100, "payment_status": active, }
Param | Type | Description |
---|---|---|
token | String | User token |
id | Number | Membership subscription id |
Object
Return list of downloads.
Kind: instance method of Memberships
Returns: Object
-
{ "currentPageIndex":1, "totalCount":11, "lastPageIndex":6, "items": [ { "id":"1", "product_id":"143142", "created_at":"12345" }, ...] }
Param | Type | Description |
---|---|---|
token | String | User token |
id | Number | Product id |
Bool
Return Correct id or not
Kind: instance method of Memberships
Param | Type | Description |
---|---|---|
id | Number | Product id |
Promise
Return Fetch Promise
Kind: instance method of Memberships
Param | Type | Description |
---|---|---|
url | String | Where request go |
token | String | auth user token |
method | String | request method must be uppercase, default 'GET' |
params | Object | request params object |
FAQs
Memberships API JS client
The npm package plasma-membership-api-client-js receives a total of 2 weekly downloads. As such, plasma-membership-api-client-js popularity was classified as not popular.
We found that plasma-membership-api-client-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 11 open source maintainers collaborating on the project.
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.