C# Class Socrata.ApiBase

Base class under which all Socrata classes inherit.
Afficher le fichier Open project: socrata-archive/socrata-csharp-deprecated

Protected Properties

Свойство Type Description
_log log4net.ILog
appToken string
batchQueue List
credentials System.Net.NetworkCredential
httpBase string

Méthodes publiques

Méthode Description
ApiBase ( ) : System
sendBatchRequest ( ) : void

Processess any batch requests saved up in the queue

Méthodes protégées

Méthode Description
GetRequest ( String url ) : JsonPayload

Performs a generic GET request on the API server

MapToJson ( string>.Dictionary data ) : Newtonsoft.Json.Linq.JObject
PostRequest ( String url, String parameters ) : JsonPayload

Performs a generice POST request on the API server

UploadFile ( String url, String file ) : JsonPayload

For uploading a file and returning JSON response.

genericWebRequest ( String url, String parameters, String method ) : JsonPayload
getAuthorization ( ) : string
responseIsClean ( JsonPayload response ) : bool

Checks response object to see if any errors are present

Method Details

ApiBase() public méthode

public ApiBase ( ) : System
Résultat System

GetRequest() protected méthode

Performs a generic GET request on the API server
protected GetRequest ( String url ) : JsonPayload
url String The URL to request from
Résultat JsonPayload

MapToJson() protected static méthode

protected static MapToJson ( string>.Dictionary data ) : Newtonsoft.Json.Linq.JObject
data string>.Dictionary
Résultat Newtonsoft.Json.Linq.JObject

PostRequest() protected méthode

Performs a generice POST request on the API server
protected PostRequest ( String url, String parameters ) : JsonPayload
url String Where to send the post request
parameters String The data to accompany the post request
Résultat JsonPayload

UploadFile() protected méthode

For uploading a file and returning JSON response.
protected UploadFile ( String url, String file ) : JsonPayload
url String Where to upload the file
file String The file location on disk
Résultat JsonPayload

genericWebRequest() protected méthode

protected genericWebRequest ( String url, String parameters, String method ) : JsonPayload
url String
parameters String
method String
Résultat JsonPayload

getAuthorization() protected méthode

protected getAuthorization ( ) : string
Résultat string

responseIsClean() protected méthode

Checks response object to see if any errors are present
protected responseIsClean ( JsonPayload response ) : bool
response JsonPayload The JSON response returned from the server
Résultat bool

sendBatchRequest() public méthode

Processess any batch requests saved up in the queue
public sendBatchRequest ( ) : void
Résultat void

Property Details

_log protected_oe static_oe property

protected static ILog,log4net _log
Résultat log4net.ILog

appToken protected_oe property

protected string appToken
Résultat string

batchQueue protected_oe property

protected List batchQueue
Résultat List

credentials protected_oe property

protected NetworkCredential,System.Net credentials
Résultat System.Net.NetworkCredential

httpBase protected_oe property

protected string httpBase
Résultat string