C# Class ZipRecruiter.Resource.APIResource

Base class for API resources. Not to be instantiated on its own.
Inheritance: ICloneable
ファイルを表示 Open project: ZipRecruiter/JobAlerts

Protected Properties

Property Type Description
batchID String
endpoint String
handle JobAlertsAPI
jobSearchID String
operatingMode APIResourceMode
subscriberID String

Public Methods

Method Description
APIResource ( JobAlertsAPI handle ) : System
AddParameter ( String key, String value ) : APIResource

Adds a single key/value pair to the parameter dictionary.

AddParameters ( String>.Dictionary parameters ) : APIResource

Adds to the parameters dictionary.

Call ( ) : dynamic

Performs the API call which has been constructed.

ClearParameters ( ) : APIResource

Clears the Parameters dictionary.

Clone ( ) : Object

Deep copy this instance.

Deactivate ( String subscriberID = "", String jobSearchID = "", String batchID = "" ) : dynamic

Attempts to deactivate a record using the given parameters. Parameters are optional and context sensitive. An exception will be thrown if an invalid parameter is given.

Query ( String>.Dictionary parameters, String subscriberID = "", String jobSearchID = "", String batchID = "" ) : dynamic

Attempts to search for records matching the given parameters. Parameters are optional and context sensitive. An exception will be thrown if an invalid parameter is given. This methods has a "parameters" dictionary argument and the results will be augmented by its contents.

Query ( String subscriberID = "", String jobSearchID = "", String batchID = "" ) : dynamic

Attempts to search for records matching the given parameters. Parameters are optional and context sensitive. An exception will be thrown if an invalid parameter is given. This methods lacks a "parameters" dictionary argument and as a result will grab all records for the specified endpoint.

RemoveParameter ( String key ) : APIResource

Removes the a single parameter from the parameter dictionary.

Retrieve ( String subscriberID = "", String jobSearchID = "", String batchID = "" ) : dynamic

Attempts to retrieve a record using the given parameters using a GET. Arguments are optional and context sensitive. An exception will be thrown if an invalid parameter is given.

Submit ( String>.Dictionary parameters, String subscriberID = "", String jobSearchID = "", String batchID = "" ) : dynamic

Attempts to retrieve a record using the given parameters using a POST. Arguments except the "parameters" Dictionary are optional and context sensitive. An exception will be thrown if an invalid parameter is given.

Protected Methods

Method Description
BuildRequestUrl ( ) : String

Builds the request URL.

DetermineSerializationType ( ) : Type

Uses the class's instance variables to determine the propper Type to be given to the XMLDeseralizer when invoked by the Call method.

Method Details

APIResource() public method

public APIResource ( JobAlertsAPI handle ) : System
handle JobAlertsAPI
return System

AddParameter() public method

Adds a single key/value pair to the parameter dictionary.
public AddParameter ( String key, String value ) : APIResource
key String Parameter Key.
value String Parameter Value.
return APIResource

AddParameters() public method

Adds to the parameters dictionary.
public AddParameters ( String>.Dictionary parameters ) : APIResource
parameters String>.Dictionary Request parameters.
return APIResource

BuildRequestUrl() protected method

Builds the request URL.
protected BuildRequestUrl ( ) : String
return String

Call() public method

Performs the API call which has been constructed.
public Call ( ) : dynamic
return dynamic

ClearParameters() public method

Clears the Parameters dictionary.
public ClearParameters ( ) : APIResource
return APIResource

Clone() public method

Deep copy this instance.
public Clone ( ) : Object
return Object

Deactivate() public method

Attempts to deactivate a record using the given parameters. Parameters are optional and context sensitive. An exception will be thrown if an invalid parameter is given.
public Deactivate ( String subscriberID = "", String jobSearchID = "", String batchID = "" ) : dynamic
subscriberID String Subscriber I.
jobSearchID String Job search I.
batchID String Batch I.
return dynamic

DetermineSerializationType() protected method

Uses the class's instance variables to determine the propper Type to be given to the XMLDeseralizer when invoked by the Call method.
protected DetermineSerializationType ( ) : Type
return System.Type

Query() public method

Attempts to search for records matching the given parameters. Parameters are optional and context sensitive. An exception will be thrown if an invalid parameter is given. This methods has a "parameters" dictionary argument and the results will be augmented by its contents.
public Query ( String>.Dictionary parameters, String subscriberID = "", String jobSearchID = "", String batchID = "" ) : dynamic
parameters String>.Dictionary Parameters.
subscriberID String Subscriber I.
jobSearchID String Job search I.
batchID String Batch I.
return dynamic

Query() public method

Attempts to search for records matching the given parameters. Parameters are optional and context sensitive. An exception will be thrown if an invalid parameter is given. This methods lacks a "parameters" dictionary argument and as a result will grab all records for the specified endpoint.
public Query ( String subscriberID = "", String jobSearchID = "", String batchID = "" ) : dynamic
subscriberID String Subscriber I.
jobSearchID String Job search I.
batchID String Batch I.
return dynamic

RemoveParameter() public method

Removes the a single parameter from the parameter dictionary.
public RemoveParameter ( String key ) : APIResource
key String Key.
return APIResource

Retrieve() public method

Attempts to retrieve a record using the given parameters using a GET. Arguments are optional and context sensitive. An exception will be thrown if an invalid parameter is given.
public Retrieve ( String subscriberID = "", String jobSearchID = "", String batchID = "" ) : dynamic
subscriberID String Subscriber ID.
jobSearchID String Job Search ID.
batchID String Batch ID.
return dynamic

Submit() public method

Attempts to retrieve a record using the given parameters using a POST. Arguments except the "parameters" Dictionary are optional and context sensitive. An exception will be thrown if an invalid parameter is given.
public Submit ( String>.Dictionary parameters, String subscriberID = "", String jobSearchID = "", String batchID = "" ) : dynamic
parameters String>.Dictionary Parameters.
subscriberID String Subscriber I.
jobSearchID String Job search I.
batchID String Batch I.
return dynamic

Property Details

batchID protected_oe property

protected String batchID
return String

endpoint protected_oe property

protected String endpoint
return String

handle protected_oe property

protected JobAlertsAPI handle
return JobAlertsAPI

jobSearchID protected_oe property

protected String jobSearchID
return String

operatingMode protected_oe property

protected APIResourceMode operatingMode
return APIResourceMode

subscriberID protected_oe property

protected String subscriberID
return String