Security News
OpenJS: “XZ Utils Cyberattack Likely Not an Isolated Incident”
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.
agendize
Advanced tools
Weekly downloads
Readme
This is a node.js module to interact with Agendize APIs. Agendize API documentation is available here: http://developers.agendize.com/. This module handles both partner authentication and application oAuth2 authentication modes.
Have an Agendize Account
Requesting your API key to our wonderful Support team
*if you are a pa rtner distributing Agendize accounts, you also need to request a SSO Token to our support team.
Finally understand how Agendize objects are working together. What is an Account? a Company, Service, Staff, Client or Appointment.
##Installation
npm install -g agendize
##Initialization
As mentioned in the developer documentation, authentication will be handled by ssoToken and apiKey.
var Agendize = require('agendize');
var options = {
apiKey:'abc1xxxxxxxxxxxxxx9jkl',
token:'mno1xxxxxxxxxxxxxx9vwz'
}
var agendizeApi = new Agendize(options)
###Your Agendize application manages multiple accounts Authentication will be done following the oAuth2 processus. According to the documentation you will need a client ID, a client Secret and a Callback URL.
var Agendize = require('agendize');
var options = {
client_id:'abc1xxxxxxxxxxxxxx9jkl',
client_secret:'mno1xxxxxxxxxxxxxx9vwz',
callback_url:'https://your.application.com/your/callback/path'
}
var agendizeApi = new Agendize(options)
##How it works Most of the functions available will have the form:
agendizeAPI.doSomethingWith(options,callback);
options is the input of the function and is discribed into each function description.
callback object is an asynchronously called function with error and result objects.
agendizeApi.doSomethingWith(options,function(error,result){
if(error){
//do something with the error
}else{
//do something with the result
}
})
result object will contain the resulted created objects depending on the options parameter. See Agendize developers documentation for each resource body.
error object
##Authentication
If you are managing multiple accounts.
Then access the reseller API following the bellow documentation.
When accessing the Account or Scheduling APIs, insert the property sso_token
inside the options
object with the value of the account's sso_token
you want to manage.
However if you work with oAuth2, insert the property access_token
inside the options
object with the value of the user's access_token
you want to manage the account of.
##Available Functions
###Reseller API You can manage multiple accounts under a partner Agendize account.
agendizeApi.createAccount(options,callback)
with required option:
options = {
account:{
email:'email_of_the_account@email.com'
}
}
options can be:
options:{
account:{
email:String,
password:String
},
staff:[
{
firstname:String,
lastname:String,
email:String
}
],
company:{
name:String
},
services:[{
name:String,
price:Int,
duration:Int
},
{
name:String,
price:Int,
duration:Int
}],
buttons:[
{
name:String
}]
,
clients:[
{
firstname:String,
lastname:String,
address:{
street:String,
zipCode:String,
city:String,
country:String
},
emailAddresses:[
{
primary:Boolean,
email:String
}]
}],
appointments:[Date,Date],
paymentProfile:{
nativePlan:Boolean,
id:Int
}
}
}
Note that according to Agendize objects management:
agendizeApi.checkIfAccountExist(options,function(error,result){
})
with required option
:
options = {
email:'email_of_the_account@email.com'
}
result
is set to true
, or false
, depending on if the email is known, or not, by Agendize.
agendizeApi.desactiveAccount(options,function(error){
})
with required ption
:
options = {
account_id:Int
}
agendizeApi.changePlan(options,function(error,result){
})
with required option
:
options = {
account_id:Int,
destination_plan:Int
}
result
is the updated account resource.
###Account API
####Get account information
agendizeApi.getAccount(options,function(error,result){
})
with required option
:
options = {
access_token:"abcdefg12345678qabcdefgh"
}
result
will be the Agendize account resource of the access_token
user owner.
However if you are a reseller and managing multiple accounts:
options = {
sso_token:"abcdefg12345678qabcdefgh"
}
result
will be the Agendize account resource of the sso_token
user owner.
###Online Scheduling API ####Get Companies
agendizeApi.getCompanies(options,function(error,result){
})
with required option
:
options = {
access_token:"abcdefg12345678qabcdefgh"
}
result
will be the Agendize company resource list of the access_token
's user's account.
However if you are a reseller and managing multiple accounts:
options = {
sso_token:"abcdefg12345678qabcdefgh"
}
result
will be the Agendize company resource list of the sso_token user owner.
####Get Clients
agendizeApi.getClients(options,function(error,result){
})
with required option
:
options = {
access_token:"abcdefg12345678qabcdefgh"
}
result
will be the Agendize client resource list of the access_token
's user's account.
However if you are a reseller and managing multiple accounts:
options = {
sso_token:"abcdefg12345678qabcdefgh"
}
result
will be the Agendize client resource list of the sso_token user owner.
####Get Staffs
agendizeApi.getClients(options,function(error,result){
})
with required option
:
options = {
access_token:"abcdefg12345678qabcdefgh",
company_id:"1234567"
}
result
will be the Agendize staff resource list of the access_token
's user's account related to the company id indicated.
However if you are a reseller and managing multiple accounts:
options = {
sso_token:"abcdefg12345678qabcdefgh"
company_id:"1234567"
}
result
will be the Agendize client resource list of the sso_token user owner related to the company id indicated.
agendizeApi.createAppointment(options,function(error,result){
})
options
required attributes:
options = {
sso_token:String,
company_id:String,
staff_id:String,
client_id:String,
service_id:String,
date:Date
}
result
will be the created appointment resource;
agendizeApi.createAppointmentWithAppointment(options,function(error,result){
})
options
required attributes:
options = {
sso_token:"abcdefg12345678qabcdefgh"
appointment:{
}
}
result
will be the created appointment resource;
You need to have a click to call button on the Agendize account.
agendizeApi.call(options,function(error,result){
})
options
required attributes:
options = {
button_id:"123456789",
number:"+1555555555"
}
#Run the examples You will need to have an Agendize developer account to use the examples then follow the bellow steps:
cd examples/click-to-call
npm install
node index.js
FAQs
An npm package for Node.Js to interact with Agendize (https://www.agendize.com/) through API (http://developers.agendize.com/). It allows to create accounts under partner accounts. Or easily build an oAuth2 application. Create companies, services, staffs,
The npm package agendize receives a total of 1 weekly downloads. As such, agendize popularity was classified as not popular.
We found that agendize demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.
Company News
Come meet the Socket team at BSidesSF and RSA! We're sponsoring several fun networking events and we would love to see you there.
Security News
OSI is starting a conversation aimed at removing the excuse of the SaaS loophole for companies navigating licensing and the complexities of doing business with open source.