npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

podium-admin-sdk

v0.0.10

Published

Podium Admin JavaScript SDK

Downloads

40

Readme

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.

| Name | Type | Default | Description | | :------------- | :------------- | :------------- | :------------- | | endpoint | url | https://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

| Name | Type | Required? | Description | | :------------- | :------------- | :------------- | :------------- | | id | number/string | yes | ID of Resource. |

List

| Name | Type | Required? | Description | | :------------- | :------------- | :------------- | :------------- | | arg1 | Filter/Paginator | no | Filter or Paginator Object. | | paginator | Paginator | no | Paginator if first parameter is filter. |

Create

| Name | Type | Required? | Description | | :------------- | :------------- | :------------- | :------------- | | object | object | no | Object to be created. |

Update

| Name | Type | Required? | Description | | :------------- | :------------- | :------------- | :------------- | | id | number/string | yes | ID of Resource. | | object | object | no | Object to be deleted. |

Delete

| Name | Type | Required? | Description | | :------------- | :------------- | :------------- | :------------- | | id | number/string | yes | ID 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()