C# 클래스 Socrata.Dataset

A Socrata dataset and associated rows/columns/metadata
상속: ApiBase
파일 보기 프로젝트 열기: socrata-archive/socrata-csharp-deprecated 1 사용 예제들

공개 메소드들

메소드 설명
addColumn ( String name ) : bool
addColumn ( String name, String description ) : bool
addColumn ( String name, String description, String type ) : bool
addColumn ( String name, String description, String type, int width ) : bool
addColumn ( String name, String description, String type, int width, bool hidden ) : bool

Adds a column to the dataset

addRow ( string>.Dictionary row ) : bool

Add a row to the dataset

append ( String filename ) : bool

Append the data in the given file to an existing dataset

append ( String filename, bool skipHeaders ) : bool

Replaces the data in the existing attached dataset with the contents of the file

attach ( string id ) : void

Attach to a given UID for a dataset that already exists

attached ( ) : bool

Check to see if the dataset is associated with a valid UID.

columns ( ) : Newtonsoft.Json.Linq.JArray

Gets a JSON representation of the columns

copy ( ) : String

Make a working copy of a published dataset, with all row data copied.

copySchema ( ) : String

Make a working copy of only the schema of a published dataset, with all row data omitted.

create ( String name ) : bool

Creates a new, blank dataset with only a name.

create ( String name, String description ) : bool

Creates a new, blank dataset.

delayAddRow ( string>.Dictionary row ) : void

Like addRow, but doesn't immediately send the data away. Instead, it stores it in a queue, which can be flushed with sendBatchRequest

delete ( ) : bool

Deletes (irreversibly) the current dataset

importFile ( String filename ) : bool

Creates a new dataset by importing a file

metadata ( ) : Newtonsoft.Json.Linq.JObject

Gets the metadata associated with the dataset

publish ( ) : bool

Performs a publish operation on a working copy dataset, to commit the changes you've made to the working copy to the published copy. Note that this should be called on the working copy, not the published version.

refresh ( String filename ) : bool

Replaces the data in the existing attached dataset with the contents of the file

refresh ( String filename, bool skipHeaders ) : bool

Replaces the data in the existing attached dataset with the contents of the file

rows ( ) : Newtonsoft.Json.Linq.JArray

Gets a JSON Array of the rows in the dataset

setAttribution ( String attribution, String url ) : void

Sets the dataset's attribution, e.g. "provided by"

setDescription ( String description ) : void

Sets the dataset's description

setPublic ( bool isPublic ) : bool

Sets the dataset's visibility

shortUrl ( ) : String

Gets an href to the dataset, shortened.

uploadFile ( String filename ) : String

Upload a file to the dataset for use in a cell (e.g. image)

비공개 메소드들

메소드 설명
copyWithMethod ( String method ) : String
isValidId ( String id ) : bool

Checks if the given string represents a valid 4-4 Socrata UID

multipartAppendOrRefresh ( String filename, String method ) : bool
multipartUpload ( String url, String filename ) : Newtonsoft.Json.Linq.JObject

Multipart upload a file

putRequest ( String body ) : void

메소드 상세

addColumn() 공개 메소드

public addColumn ( String name ) : bool
name String
리턴 bool

addColumn() 공개 메소드

public addColumn ( String name, String description ) : bool
name String
description String
리턴 bool

addColumn() 공개 메소드

public addColumn ( String name, String description, String type ) : bool
name String
description String
type String
리턴 bool

addColumn() 공개 메소드

public addColumn ( String name, String description, String type, int width ) : bool
name String
description String
type String
width int
리턴 bool

addColumn() 공개 메소드

Adds a column to the dataset
public addColumn ( String name, String description, String type, int width, bool hidden ) : bool
name String The name of the column
description String An optional description
type String The column type. See API docs vor valid types
width int How many pixels wide to make the column
hidden bool If true, don't show the column in views, just store the data
리턴 bool

addRow() 공개 메소드

Add a row to the dataset
public addRow ( string>.Dictionary row ) : bool
row string>.Dictionary A dictionary of column/celldata values
리턴 bool

append() 공개 메소드

Append the data in the given file to an existing dataset
public append ( String filename ) : bool
filename String The location of the file on disk
리턴 bool

append() 공개 메소드

Replaces the data in the existing attached dataset with the contents of the file
public append ( String filename, bool skipHeaders ) : bool
filename String The location of the file to add to the dataset
skipHeaders bool Whether to skip the first row of your import file
리턴 bool

attach() 공개 메소드

Attach to a given UID for a dataset that already exists
public attach ( string id ) : void
id string The Socrata UID
리턴 void

attached() 공개 메소드

Check to see if the dataset is associated with a valid UID.
public attached ( ) : bool
리턴 bool

columns() 공개 메소드

Gets a JSON representation of the columns
public columns ( ) : Newtonsoft.Json.Linq.JArray
리턴 Newtonsoft.Json.Linq.JArray

copy() 공개 메소드

Make a working copy of a published dataset, with all row data copied.
public copy ( ) : String
리턴 String

copySchema() 공개 메소드

Make a working copy of only the schema of a published dataset, with all row data omitted.
public copySchema ( ) : String
리턴 String

create() 공개 메소드

Creates a new, blank dataset with only a name.
public create ( String name ) : bool
name String The title of the dataset
리턴 bool

create() 공개 메소드

Creates a new, blank dataset.
public create ( String name, String description ) : bool
name String The name of the dataset (must be unique)
description String On optional description
리턴 bool

delayAddRow() 공개 메소드

Like addRow, but doesn't immediately send the data away. Instead, it stores it in a queue, which can be flushed with sendBatchRequest
public delayAddRow ( string>.Dictionary row ) : void
row string>.Dictionary A dictionary of column/celldata values
리턴 void

delete() 공개 메소드

Deletes (irreversibly) the current dataset
public delete ( ) : bool
리턴 bool

importFile() 공개 메소드

Creates a new dataset by importing a file
public importFile ( String filename ) : bool
filename String The location of the file on disk
리턴 bool

metadata() 공개 메소드

Gets the metadata associated with the dataset
public metadata ( ) : Newtonsoft.Json.Linq.JObject
리턴 Newtonsoft.Json.Linq.JObject

publish() 공개 메소드

Performs a publish operation on a working copy dataset, to commit the changes you've made to the working copy to the published copy. Note that this should be called on the working copy, not the published version.
public publish ( ) : bool
리턴 bool

refresh() 공개 메소드

Replaces the data in the existing attached dataset with the contents of the file
public refresh ( String filename ) : bool
filename String The location of the file to overwrite the dataset with
리턴 bool

refresh() 공개 메소드

Replaces the data in the existing attached dataset with the contents of the file
public refresh ( String filename, bool skipHeaders ) : bool
filename String The location of the file to overwrite the dataset with
skipHeaders bool Whether to skip the first row of your import file
리턴 bool

rows() 공개 메소드

Gets a JSON Array of the rows in the dataset
public rows ( ) : Newtonsoft.Json.Linq.JArray
리턴 Newtonsoft.Json.Linq.JArray

setAttribution() 공개 메소드

Sets the dataset's attribution, e.g. "provided by"
public setAttribution ( String attribution, String url ) : void
attribution String Name of the data source/organization
url String An optional link to the data source
리턴 void

setDescription() 공개 메소드

Sets the dataset's description
public setDescription ( String description ) : void
description String The description
리턴 void

setPublic() 공개 메소드

Sets the dataset's visibility
public setPublic ( bool isPublic ) : bool
isPublic bool Whether or not it should be publicly viewable
리턴 bool

shortUrl() 공개 메소드

Gets an href to the dataset, shortened.
public shortUrl ( ) : String
리턴 String

uploadFile() 공개 메소드

Upload a file to the dataset for use in a cell (e.g. image)
public uploadFile ( String filename ) : String
filename String Where the file is located on disk
리턴 String