C# Class JotForm.APIClient

Mostra file Open project: jotform/jotform-api-csharp Class Usage Examples

Public Methods

Method Description
APIClient ( ) : System
APIClient ( String apiKey, bool debugMode = false ) : System
cloneForm ( long formID ) : Newtonsoft.Json.Linq.JObject

Clone a single form

createForm ( dynamic>.Dictionary form ) : Newtonsoft.Json.Linq.JObject

Create a new form

createFormQuestion ( long formID, string>.Dictionary question ) : Newtonsoft.Json.Linq.JObject

Add new question to specified form.

createFormQuestions ( long formID, string questions ) : Newtonsoft.Json.Linq.JObject

Add new questions to specified form

createFormSubmission ( long formID, string>.Dictionary submission ) : Newtonsoft.Json.Linq.JObject

Submit data to this form using the API

createFormSubmissions ( long formID, string submissions ) : Newtonsoft.Json.Linq.JObject

Submit data to this form using the API

createFormWebhook ( long formID, string webhookURL ) : Newtonsoft.Json.Linq.JObject

Add a new webhook

createForms ( string form ) : Newtonsoft.Json.Linq.JObject

Create new forms

createReport ( long formID, string>.Dictionary report ) : Newtonsoft.Json.Linq.JObject

Create new report of a form

deleteForm ( long formID ) : Newtonsoft.Json.Linq.JObject

Delete a specific form

deleteFormQuestion ( long formID, long qid ) : Newtonsoft.Json.Linq.JObject

Delete a single form question

deleteFormWebhook ( long formID, long webhookID ) : Newtonsoft.Json.Linq.JObject

Delete a specific webhook of a form

deleteReport ( long reportID ) : Newtonsoft.Json.Linq.JObject

Delete a report of a form

deleteSubmission ( long sid ) : Newtonsoft.Json.Linq.JObject

Delete a single submission

editFormQuestion ( long formID, long qid, string>.Dictionary questionProperties ) : Newtonsoft.Json.Linq.JObject

Add or edit a single question properties

editSubmission ( long sid, string>.Dictionary submission ) : Newtonsoft.Json.Linq.JObject

Edit a single submission

getFolder ( String folderID ) : Newtonsoft.Json.Linq.JObject

Get folder details

getFolders ( ) : Newtonsoft.Json.Linq.JObject

Get a list of form folders for this account

getForm ( long formID ) : Newtonsoft.Json.Linq.JObject

Get basic information about a form

getFormFiles ( long formID ) : Newtonsoft.Json.Linq.JObject

List of files uploaded on a form

getFormProperties ( long formID ) : Newtonsoft.Json.Linq.JObject

Get a list of all properties on a form

getFormProperty ( long formID, string propertyKey ) : Newtonsoft.Json.Linq.JObject

Get a specific property of the form

getFormQuestion ( long formID, long qid ) : Newtonsoft.Json.Linq.JObject

Get details about a question

getFormQuestions ( long formID ) : Newtonsoft.Json.Linq.JObject

Get a list of all questions on a form

getFormReports ( long formID ) : Newtonsoft.Json.Linq.JObject

Get all the reports of a form, such as excel, csv, grid, html, etc.

getFormSubmissons ( long formID, int offset, int limit, String>.Dictionary filter = null, String orderBy = null ) : Newtonsoft.Json.Linq.JObject

List of a form submissions

getFormWebhooks ( long formID ) : Newtonsoft.Json.Linq.JObject

Get list of webhooks for a form

getForms ( int offset, int limit, String>.Dictionary filter = null, String orderBy = null ) : Newtonsoft.Json.Linq.JObject

Get a list of forms for this account

getHistory ( string action = "", string date = "", string sortBy = "", string startDate = "", string endDate = "" ) : Newtonsoft.Json.Linq.JObject

Get user activity log

getPlan ( String planName ) : Newtonsoft.Json.Linq.JObject

Get details of a plan

getReport ( long reportID ) : Newtonsoft.Json.Linq.JObject

Get report details

getReports ( ) : Newtonsoft.Json.Linq.JObject

List of URLS for reports in this account

getSettings ( ) : Newtonsoft.Json.Linq.JObject

Get user's settings for this account

getSubmission ( long sid ) : Newtonsoft.Json.Linq.JObject

Get submission data

getSubmissions ( int offset, int limit, String>.Dictionary filter = null, String orderBy = null ) : Newtonsoft.Json.Linq.JObject

Get a list of submissions for this account

getSubusers ( ) : Newtonsoft.Json.Linq.JObject

Get a list of sub users for this account

getUsage ( ) : Newtonsoft.Json.Linq.JObject

Get number of form submissions received this month

getUser ( ) : Newtonsoft.Json.Linq.JObject

Get user account details for a JotForm user

loginUser ( string>.Dictionary credentials ) : Newtonsoft.Json.Linq.JObject

Login user with given credentials

logoutUser ( ) : Newtonsoft.Json.Linq.JObject

Logout user

registerUser ( string>.Dictionary userDetails ) : Newtonsoft.Json.Linq.JObject

Register with username, password and email

setFormProperties ( long formID, string>.Dictionary formProperties ) : Newtonsoft.Json.Linq.JObject

Add or edit properties of a specific form

setMultipleFormProperties ( long formID, string formProperties ) : Newtonsoft.Json.Linq.JObject

Add or edit properties of a specific form

updateSettings ( string>.Dictionary settings ) : Newtonsoft.Json.Linq.JObject

Update user's settings

Private Methods

Method Description
CreateConditions ( int offset, int limit, String>.Dictionary filter, String orderBy ) : NameValueCollection
CreateHistoryQuery ( string action, string date, string sortBy, string startDate, string endDate ) : NameValueCollection
ToQueryString ( NameValueCollection nvc ) : string
debug ( String str ) : void
executeDeleteRequest ( string path, NameValueCollection parameters = null ) : Newtonsoft.Json.Linq.JObject
executeGetRequest ( string path, NameValueCollection parameters = null ) : Newtonsoft.Json.Linq.JObject
executeHttpRequest ( string path, NameValueCollection parameters, string method ) : Newtonsoft.Json.Linq.JObject
executeHttpRequest ( string path, string parameters ) : Newtonsoft.Json.Linq.JObject
executePostRequest ( string path, NameValueCollection parameters = null ) : Newtonsoft.Json.Linq.JObject
executePutRequest ( string path, string parameters = null ) : Newtonsoft.Json.Linq.JObject

Method Details

APIClient() public method

public APIClient ( ) : System
return System

APIClient() public method

public APIClient ( String apiKey, bool debugMode = false ) : System
apiKey String
debugMode bool
return System

cloneForm() public method

Clone a single form
public cloneForm ( long formID ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
return Newtonsoft.Json.Linq.JObject

createForm() public method

Create a new form
public createForm ( dynamic>.Dictionary form ) : Newtonsoft.Json.Linq.JObject
form dynamic>.Dictionary Questions, properties and emails of new form.
return Newtonsoft.Json.Linq.JObject

createFormQuestion() public method

Add new question to specified form.
public createFormQuestion ( long formID, string>.Dictionary question ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
question string>.Dictionary
return Newtonsoft.Json.Linq.JObject

createFormQuestions() public method

Add new questions to specified form
public createFormQuestions ( long formID, string questions ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
questions string New question properties like type and text.
return Newtonsoft.Json.Linq.JObject

createFormSubmission() public method

Submit data to this form using the API
public createFormSubmission ( long formID, string>.Dictionary submission ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
submission string>.Dictionary Submission data with question IDs
return Newtonsoft.Json.Linq.JObject

createFormSubmissions() public method

Submit data to this form using the API
public createFormSubmissions ( long formID, string submissions ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
submissions string Submission data with question IDs.
return Newtonsoft.Json.Linq.JObject

createFormWebhook() public method

Add a new webhook
public createFormWebhook ( long formID, string webhookURL ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
webhookURL string Webhook URL is where form data will be posted when form is submitted.
return Newtonsoft.Json.Linq.JObject

createForms() public method

Create new forms
public createForms ( string form ) : Newtonsoft.Json.Linq.JObject
form string Questions, properties and emails of new forms.
return Newtonsoft.Json.Linq.JObject

createReport() public method

Create new report of a form
public createReport ( long formID, string>.Dictionary report ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
report string>.Dictionary Report details. List type, title etc.
return Newtonsoft.Json.Linq.JObject

deleteForm() public method

Delete a specific form
public deleteForm ( long formID ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
return Newtonsoft.Json.Linq.JObject

deleteFormQuestion() public method

Delete a single form question
public deleteFormQuestion ( long formID, long qid ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
qid long Identifier for each question on a form. You can get a list of question IDs from /form/{id}/questions.
return Newtonsoft.Json.Linq.JObject

deleteFormWebhook() public method

Delete a specific webhook of a form
public deleteFormWebhook ( long formID, long webhookID ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
webhookID long You can get webhook IDs when you call /form/{formID}/webhooks.
return Newtonsoft.Json.Linq.JObject

deleteReport() public method

Delete a report of a form
public deleteReport ( long reportID ) : Newtonsoft.Json.Linq.JObject
reportID long You can get a list of reports from /user/reports
return Newtonsoft.Json.Linq.JObject

deleteSubmission() public method

Delete a single submission
public deleteSubmission ( long sid ) : Newtonsoft.Json.Linq.JObject
sid long You can get submission IDs when you call /user/submissions.
return Newtonsoft.Json.Linq.JObject

editFormQuestion() public method

Add or edit a single question properties
public editFormQuestion ( long formID, long qid, string>.Dictionary questionProperties ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
qid long Identifier for each question on a form. You can get a list of question IDs from /form/{id}/questions.
questionProperties string>.Dictionary New question properties like text and order.
return Newtonsoft.Json.Linq.JObject

editSubmission() public method

Edit a single submission
public editSubmission ( long sid, string>.Dictionary submission ) : Newtonsoft.Json.Linq.JObject
sid long You can get submission IDs when you call /user/submissions.
submission string>.Dictionary New submission data with question IDs
return Newtonsoft.Json.Linq.JObject

getFolder() public method

Get folder details
public getFolder ( String folderID ) : Newtonsoft.Json.Linq.JObject
folderID String You can get folders IDs when you call /user/folders.
return Newtonsoft.Json.Linq.JObject

getFolders() public method

Get a list of form folders for this account
public getFolders ( ) : Newtonsoft.Json.Linq.JObject
return Newtonsoft.Json.Linq.JObject

getForm() public method

Get basic information about a form
public getForm ( long formID ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
return Newtonsoft.Json.Linq.JObject

getFormFiles() public method

List of files uploaded on a form
public getFormFiles ( long formID ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
return Newtonsoft.Json.Linq.JObject

getFormProperties() public method

Get a list of all properties on a form
public getFormProperties ( long formID ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
return Newtonsoft.Json.Linq.JObject

getFormProperty() public method

Get a specific property of the form
public getFormProperty ( long formID, string propertyKey ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
propertyKey string Property key
return Newtonsoft.Json.Linq.JObject

getFormQuestion() public method

Get details about a question
public getFormQuestion ( long formID, long qid ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
qid long Identifier for each question on a form. You can get a list of question IDs from /form/{id}/questions.
return Newtonsoft.Json.Linq.JObject

getFormQuestions() public method

Get a list of all questions on a form
public getFormQuestions ( long formID ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
return Newtonsoft.Json.Linq.JObject

getFormReports() public method

Get all the reports of a form, such as excel, csv, grid, html, etc.
public getFormReports ( long formID ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
return Newtonsoft.Json.Linq.JObject

getFormSubmissons() public method

List of a form submissions
public getFormSubmissons ( long formID, int offset, int limit, String>.Dictionary filter = null, String orderBy = null ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
offset int Start of each result set for form list. (optional)
limit int Number of results in each result set for form list. (optional)
filter String>.Dictionary Filters the query results to fetch a specific form range.(optional)
orderBy String Order results by a form field name. (optional)
return Newtonsoft.Json.Linq.JObject

getFormWebhooks() public method

Get list of webhooks for a form
public getFormWebhooks ( long formID ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
return Newtonsoft.Json.Linq.JObject

getForms() public method

Get a list of forms for this account
public getForms ( int offset, int limit, String>.Dictionary filter = null, String orderBy = null ) : Newtonsoft.Json.Linq.JObject
offset int Start of each result set for form list (optional)
limit int Number of results in each result set for form list (optional)
filter String>.Dictionary Filters the query results to fetch a specific form range (optional)
orderBy String Order results by a form field name (optional)
return Newtonsoft.Json.Linq.JObject

getHistory() public method

Get user activity log
public getHistory ( string action = "", string date = "", string sortBy = "", string startDate = "", string endDate = "" ) : Newtonsoft.Json.Linq.JObject
action string Filter results by activity performed. Default is 'all'.
date string Limit results by a date range. If you'd like to limit results by specific dates you can use startDate and endDate fields instead.
sortBy string Lists results by ascending and descending order.
startDate string
endDate string Limit results to only before a specific date. Format: MM/DD/YYYY.
return Newtonsoft.Json.Linq.JObject

getPlan() public method

Get details of a plan
public getPlan ( String planName ) : Newtonsoft.Json.Linq.JObject
planName String Name of the requested plan. FREE, PREMIUM etc.
return Newtonsoft.Json.Linq.JObject

getReport() public method

Get report details
public getReport ( long reportID ) : Newtonsoft.Json.Linq.JObject
reportID long You can get a list of reports from /user/reports
return Newtonsoft.Json.Linq.JObject

getReports() public method

List of URLS for reports in this account
public getReports ( ) : Newtonsoft.Json.Linq.JObject
return Newtonsoft.Json.Linq.JObject

getSettings() public method

Get user's settings for this account
public getSettings ( ) : Newtonsoft.Json.Linq.JObject
return Newtonsoft.Json.Linq.JObject

getSubmission() public method

Get submission data
public getSubmission ( long sid ) : Newtonsoft.Json.Linq.JObject
sid long You can get submission IDs when you call /form/{id}/submissions.
return Newtonsoft.Json.Linq.JObject

getSubmissions() public method

Get a list of submissions for this account
public getSubmissions ( int offset, int limit, String>.Dictionary filter = null, String orderBy = null ) : Newtonsoft.Json.Linq.JObject
offset int Start of each result set for form list. (optional)
limit int Number of results in each result set for form list. (optional)
filter String>.Dictionary Filters the query results to fetch a specific form range.(optional)
orderBy String Order results by a form field name. (optional)
return Newtonsoft.Json.Linq.JObject

getSubusers() public method

Get a list of sub users for this account
public getSubusers ( ) : Newtonsoft.Json.Linq.JObject
return Newtonsoft.Json.Linq.JObject

getUsage() public method

Get number of form submissions received this month
public getUsage ( ) : Newtonsoft.Json.Linq.JObject
return Newtonsoft.Json.Linq.JObject

getUser() public method

Get user account details for a JotForm user
public getUser ( ) : Newtonsoft.Json.Linq.JObject
return Newtonsoft.Json.Linq.JObject

loginUser() public method

Login user with given credentials
public loginUser ( string>.Dictionary credentials ) : Newtonsoft.Json.Linq.JObject
credentials string>.Dictionary Username, password, application name and access type of user
return Newtonsoft.Json.Linq.JObject

logoutUser() public method

Logout user
public logoutUser ( ) : Newtonsoft.Json.Linq.JObject
return Newtonsoft.Json.Linq.JObject

registerUser() public method

Register with username, password and email
public registerUser ( string>.Dictionary userDetails ) : Newtonsoft.Json.Linq.JObject
userDetails string>.Dictionary Username, password and email to register a new user
return Newtonsoft.Json.Linq.JObject

setFormProperties() public method

Add or edit properties of a specific form
public setFormProperties ( long formID, string>.Dictionary formProperties ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
formProperties string>.Dictionary New properties like label width.
return Newtonsoft.Json.Linq.JObject

setMultipleFormProperties() public method

Add or edit properties of a specific form
public setMultipleFormProperties ( long formID, string formProperties ) : Newtonsoft.Json.Linq.JObject
formID long Form ID is the numbers you see on a form URL. You can get form IDs when you call /user/forms.
formProperties string New properties like label width.
return Newtonsoft.Json.Linq.JObject

updateSettings() public method

Update user's settings
public updateSettings ( string>.Dictionary settings ) : Newtonsoft.Json.Linq.JObject
settings string>.Dictionary New user setting values with setting keys
return Newtonsoft.Json.Linq.JObject