Skip to content

Latest commit

 

History

History
386 lines (263 loc) · 10.9 KB

File metadata and controls

386 lines (263 loc) · 10.9 KB

egoisdk.WebpushApi

All URIs are relative to https://api.egoiapp.com

Method HTTP request Description
actionEnableWebPushRss POST /campaigns/webpush/rss/{campaign_hash}/actions/enable Enable a rss webpush campaign
actionSendWebPush POST /campaigns/web-push/{campaign_hash}/actions/send Send webpush message
createWebPushCampaign POST /campaigns/web-push Create new webpush campaign
createWebPushRssCampaign POST /campaigns/webpush/rss Create new webpush rss campaign
createWebpushSite POST /webpush/sites Creates a webpush site
getAllWebPushSites GET /webpush/sites Get all webpush sites
patchWebPushCampaign PATCH /campaigns/web-push/{campaign_hash} Update a specific webpush campaign

actionEnableWebPushRss

AcceptedResponse actionEnableWebPushRss(campaignHash)

Enable a rss webpush campaign

Enable rss webpush message

Example

import egoisdk from 'egoisdk';
let defaultClient = egoisdk.ApiClient.instance;
// Configure API key authorization: Apikey
let Apikey = defaultClient.authentications['Apikey'];
Apikey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.apiKeyPrefix = 'Token';

let apiInstance = new egoisdk.WebpushApi();
let campaignHash = "campaignHash_example"; // String | Hash of the Campaign
apiInstance.actionEnableWebPushRss(campaignHash, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
campaignHash String Hash of the Campaign

Return type

AcceptedResponse

Authorization

Apikey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

actionSendWebPush

AcceptedResponse actionSendWebPush(campaignHash, campaignWebPushSendRequest)

Send webpush message

Deploys and sends a webpush message

Example

import egoisdk from 'egoisdk';
let defaultClient = egoisdk.ApiClient.instance;
// Configure API key authorization: Apikey
let Apikey = defaultClient.authentications['Apikey'];
Apikey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.apiKeyPrefix = 'Token';

let apiInstance = new egoisdk.WebpushApi();
let campaignHash = "campaignHash_example"; // String | Hash of the Campaign
let campaignWebPushSendRequest = new egoisdk.CampaignWebPushSendRequest(); // CampaignWebPushSendRequest | Parameters for the 'send web-push' action
apiInstance.actionSendWebPush(campaignHash, campaignWebPushSendRequest, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
campaignHash String Hash of the Campaign
campaignWebPushSendRequest CampaignWebPushSendRequest Parameters for the 'send web-push' action

Return type

AcceptedResponse

Authorization

Apikey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createWebPushCampaign

PatchVoiceCampaign200Response createWebPushCampaign(webPushCampaign)

Create new webpush campaign

Create a new webpush campaign

Example

import egoisdk from 'egoisdk';
let defaultClient = egoisdk.ApiClient.instance;
// Configure API key authorization: Apikey
let Apikey = defaultClient.authentications['Apikey'];
Apikey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.apiKeyPrefix = 'Token';

let apiInstance = new egoisdk.WebpushApi();
let webPushCampaign = new egoisdk.WebPushCampaign(); // WebPushCampaign | Parameters for the webpush campaign
apiInstance.createWebPushCampaign(webPushCampaign, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
webPushCampaign WebPushCampaign Parameters for the webpush campaign

Return type

PatchVoiceCampaign200Response

Authorization

Apikey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createWebPushRssCampaign

HashcodeCampaign createWebPushRssCampaign(webPushRssCampaign)

Create new webpush rss campaign

Create a new webpush rss campaign

Example

import egoisdk from 'egoisdk';
let defaultClient = egoisdk.ApiClient.instance;
// Configure API key authorization: Apikey
let Apikey = defaultClient.authentications['Apikey'];
Apikey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.apiKeyPrefix = 'Token';

let apiInstance = new egoisdk.WebpushApi();
let webPushRssCampaign = new egoisdk.WebPushRssCampaign(); // WebPushRssCampaign | Parameters for the WebPush Campaign
apiInstance.createWebPushRssCampaign(webPushRssCampaign, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
webPushRssCampaign WebPushRssCampaign Parameters for the WebPush Campaign

Return type

HashcodeCampaign

Authorization

Apikey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createWebpushSite

WebPushSite createWebpushSite(webPushSite)

Creates a webpush site

Create a new webpush site

Example

import egoisdk from 'egoisdk';
let defaultClient = egoisdk.ApiClient.instance;
// Configure API key authorization: Apikey
let Apikey = defaultClient.authentications['Apikey'];
Apikey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.apiKeyPrefix = 'Token';

let apiInstance = new egoisdk.WebpushApi();
let webPushSite = new egoisdk.WebPushSite(); // WebPushSite | Parameters for the webpush site
apiInstance.createWebpushSite(webPushSite, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
webPushSite WebPushSite Parameters for the webpush site

Return type

WebPushSite

Authorization

Apikey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getAllWebPushSites

TagCollection1 getAllWebPushSites(opts)

Get all webpush sites

Returns all wepush's sites

Example

import egoisdk from 'egoisdk';
let defaultClient = egoisdk.ApiClient.instance;
// Configure API key authorization: Apikey
let Apikey = defaultClient.authentications['Apikey'];
Apikey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.apiKeyPrefix = 'Token';

let apiInstance = new egoisdk.WebpushApi();
let opts = {
  'offset': 56, // Number | Element offset (starting at zero for the first element)
  'limit': 10, // Number | Number of items to return
  'order': "'desc'", // String | Type of order
  'orderBy': "'list_id'", // String | Reference attribute to order sites
  'listId': 56 // Number | Select sites referenced to a list
};
apiInstance.getAllWebPushSites(opts, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
offset Number Element offset (starting at zero for the first element) [optional]
limit Number Number of items to return [optional] [default to 10]
order String Type of order [optional] [default to 'desc']
orderBy String Reference attribute to order sites [optional] [default to 'list_id']
listId Number Select sites referenced to a list [optional]

Return type

TagCollection1

Authorization

Apikey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

patchWebPushCampaign

PatchVoiceCampaign200Response patchWebPushCampaign(campaignHash, webPushPatchCampaign)

Update a specific webpush campaign

Update a webpush campaign

Example

import egoisdk from 'egoisdk';
let defaultClient = egoisdk.ApiClient.instance;
// Configure API key authorization: Apikey
let Apikey = defaultClient.authentications['Apikey'];
Apikey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.apiKeyPrefix = 'Token';

let apiInstance = new egoisdk.WebpushApi();
let campaignHash = "campaignHash_example"; // String | Hash of the Campaign
let webPushPatchCampaign = new egoisdk.WebPushPatchCampaign(); // WebPushPatchCampaign | Parameters for the Webpush Campaign
apiInstance.patchWebPushCampaign(campaignHash, webPushPatchCampaign, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
campaignHash String Hash of the Campaign
webPushPatchCampaign WebPushPatchCampaign Parameters for the Webpush Campaign

Return type

PatchVoiceCampaign200Response

Authorization

Apikey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json