C# Класс Socrata.ApiBase

Base class under which all Socrata classes inherit.
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
_log log4net.ILog
appToken string
batchQueue List
credentials System.Net.NetworkCredential
httpBase string

Открытые методы

Метод Описание
ApiBase ( ) : System
sendBatchRequest ( ) : void

Processess any batch requests saved up in the queue

Защищенные методы

Метод Описание
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

Описание методов

ApiBase() публичный Метод

public ApiBase ( ) : System
Результат System

GetRequest() защищенный Метод

Performs a generic GET request on the API server
protected GetRequest ( String url ) : JsonPayload
url String The URL to request from
Результат JsonPayload

MapToJson() защищенный статический Метод

protected static MapToJson ( string>.Dictionary data ) : Newtonsoft.Json.Linq.JObject
data string>.Dictionary
Результат Newtonsoft.Json.Linq.JObject

PostRequest() защищенный Метод

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
Результат JsonPayload

UploadFile() защищенный Метод

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
Результат JsonPayload

genericWebRequest() защищенный Метод

protected genericWebRequest ( String url, String parameters, String method ) : JsonPayload
url String
parameters String
method String
Результат JsonPayload

getAuthorization() защищенный Метод

protected getAuthorization ( ) : string
Результат string

responseIsClean() защищенный Метод

Checks response object to see if any errors are present
protected responseIsClean ( JsonPayload response ) : bool
response JsonPayload The JSON response returned from the server
Результат bool

sendBatchRequest() публичный Метод

Processess any batch requests saved up in the queue
public sendBatchRequest ( ) : void
Результат void

Описание свойств

_log защищенное статическое свойство

protected static ILog,log4net _log
Результат log4net.ILog

appToken защищенное свойство

protected string appToken
Результат string

batchQueue защищенное свойство

protected List batchQueue
Результат List

credentials защищенное свойство

protected NetworkCredential,System.Net credentials
Результат System.Net.NetworkCredential

httpBase защищенное свойство

protected string httpBase
Результат string