All URIs are relative to https://api.egoiapp.com
| Method | HTTP request | Description |
|---|---|---|
| actionSendPush | POST /campaigns/push/{campaign_hash}/actions/send | Send push message |
| createPushCampaign | POST /campaigns/push | Create new push campaign |
| getPushApp | GET /push/apps/{app_id} | Get a Push application from E-goi |
| getPushApps | GET /push/apps | Get all Push applications from E-goi |
| patchPushCampaign | PATCH /campaigns/push/{campaign_hash} | Update a specific push campaign |
| registerPushEvent | POST /push/apps/{app_id}/event | Registers an event from the push notification. |
| registerPushToken | POST /push/apps/{app_id}/token | Registers a Firebase token |
AcceptedResponse actionSendPush(campaignHash, campaignPushSendRequest)
Send push message
Deploys and sends a push message
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.PushApi();
let campaignHash = "campaignHash_example"; // String | Hash of the Campaign
let campaignPushSendRequest = new egoisdk.CampaignPushSendRequest(); // CampaignPushSendRequest | Parameters for the 'send push' action
apiInstance.actionSendPush(campaignHash, campaignPushSendRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| campaignHash | String | Hash of the Campaign | |
| campaignPushSendRequest | CampaignPushSendRequest | Parameters for the 'send push' action |
- Content-Type: application/json
- Accept: application/json
HashcodeCampaign createPushCampaign(pushCampaignPostRequest)
Create new push campaign
Create a new push campaign
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.PushApi();
let pushCampaignPostRequest = new egoisdk.PushCampaignPostRequest(); // PushCampaignPostRequest | Parameters for the push campaign
apiInstance.createPushCampaign(pushCampaignPostRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| pushCampaignPostRequest | PushCampaignPostRequest | Parameters for the push campaign |
- Content-Type: application/json
- Accept: application/json
AppStructure getPushApp(appId)
Get a Push application from E-goi
Get a Push application from E-goi
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.PushApi();
let appId = "appId_example"; // String | ID of the E-goi push app.
apiInstance.getPushApp(appId, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| appId | String | ID of the E-goi push app. |
- Content-Type: Not defined
- Accept: application/json
[AppStructure] getPushApps(opts)
Get all Push applications from E-goi
Get all Push applications from E-goi
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.PushApi();
let opts = {
'listId': 56 // Number | ID of the list to search for.
};
apiInstance.getPushApps(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| listId | Number | ID of the list to search for. | [optional] |
- Content-Type: Not defined
- Accept: application/json
HashcodeCampaign patchPushCampaign(campaignHash, pushCampaignPatchRequest)
Update a specific push campaign
Update push campaign
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.PushApi();
let campaignHash = "campaignHash_example"; // String | Hash of the Campaign
let pushCampaignPatchRequest = new egoisdk.PushCampaignPatchRequest(); // PushCampaignPatchRequest | Parameters for the push campaign
apiInstance.patchPushCampaign(campaignHash, pushCampaignPatchRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| campaignHash | String | Hash of the Campaign | |
| pushCampaignPatchRequest | PushCampaignPatchRequest | Parameters for the push campaign |
- Content-Type: application/json
- Accept: application/json
PushResponse registerPushEvent(appId, pushEvent)
Registers an event from the push notification.
Registers a Firebase token
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.PushApi();
let appId = "appId_example"; // String | ID of the E-goi push app.
let pushEvent = new egoisdk.PushEvent(); // PushEvent | Parameters for the event
apiInstance.registerPushEvent(appId, pushEvent, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| appId | String | ID of the E-goi push app. | |
| pushEvent | PushEvent | Parameters for the event |
- Content-Type: application/json
- Accept: application/json
PushResponse registerPushToken(appId, pushToken)
Registers a Firebase token
Registers a Firebase token
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.PushApi();
let appId = "appId_example"; // String | ID of the E-goi push app.
let pushToken = new egoisdk.PushToken(); // PushToken | Parameters for the token
apiInstance.registerPushToken(appId, pushToken, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| appId | String | ID of the E-goi push app. | |
| pushToken | PushToken | Parameters for the token |
- Content-Type: application/json
- Accept: application/json