New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

podium-admin-sdk

Package Overview
Dependencies
Maintainers
6
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

podium-admin-sdk

Podium Admin JavaScript SDK

latest
Source
npmnpm
Version
0.0.10
Version published
Maintainers
6
Created
Source

Podium Admin JavaScript SDK

This library allows you to access the Podium Admin REST API for building client applications.

Installation

npm install podium-admin-sdk

Usage

import { Podium, PodiumPaginator, PodiumFilter } from 'podium-admin-sdk'
let podium = new Podium({
  endpoint: 'https://admin.podiumrewards.com/api/'
})

podium.Auth.login(email, password).then(rsp => {
  console.log(rsp.message)
}).catch(error => {
  console.log(error.message)
})

let filter = new PodiumFilter()
    filter.setValues({ customer_id: 1, search: 'Dan' })
let paginator = new PodiumPaginator()
    paginator.setPerPage(5)
    paginator.setSortField('last_name')
    paginator.setSortDirection('asc')
podium.Users.List(filter, paginator).then((rsp) => {
      console.log(rsp)
})

Settings

Settings can be passed into the Podium constructor as a JSON object.

NameTypeDefaultDescription
endpointurlhttps://api.podiumrewards.com/v1/The Podium endpoint URL.

API methods

Authentication

Log in with a username and password and receive an API token to interact with other resources available via the API. The logout endpoint deletes the authentication token.

Podium.Auth.Login(email, password)
Podium.Auth.GetToken()
Podium.Auth.SetToken(string)
Podium.Auth.HasToken()
Podium.Auth.logout()

Podium Resource

Log in with a username and password and receive an API token to interact with other resources available via the API. The logout endpoint deletes the authentication token.

Get
NameTypeRequired?Description
idnumber/stringyesID of Resource.
List
NameTypeRequired?Description
arg1Filter/PaginatornoFilter or Paginator Object.
paginatorPaginatornoPaginator if first parameter is filter.
Create
NameTypeRequired?Description
objectobjectnoObject to be created.
Update
NameTypeRequired?Description
idnumber/stringyesID of Resource.
objectobjectnoObject to be deleted.
Delete
NameTypeRequired?Description
idnumber/stringyesID of object to be delete.

Methods that extend Resource

Podium.Auth
Podium.Campaigns.Flex.Flex
Podium.Campaigns.Flex.Issue.File
Podium.Campaigns.Flex.Issue.FileError
Podium.Campaigns.Flex.Issue.Manual
Podium.Campaigns.Flex.Rule
Podium.Campaigns.Incentive
Podium.LRG.Configuration
Podium.LRG.Session
Podium.Product.Catalog
Podium.Product.Filterable
Podium.Rewards
Podium.Segments
Podium.SSO.Attributes
Podium.Terms.Latest
Podium.Terms.Terms
Podium.Users

Paginator properties

The following set properties are chainable:

PodiumPaginator.setPage(number)
PodiumPaginator.setPerPage(number)
PodiumPaginator.setSortField(field)
PodiumPaginator.setSortDirection([asc|desc])
PodiumPaginator.setSortDesc(boolean)
PodiumPaginator.toParams()

Filter properties

The following set properties are chainable:

PodiumFilter.setValues(object)
PodiumFilter.getValues(number)
PodiumFilter.toParams()

Keywords

loyalty

FAQs

Package last updated on 06 Apr 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