C# Class CkanDotNet.Web.Models.CkanHelper

Show file Open project: opencolorado/.NET-Wrapper-for-CKAN-API Class Usage Examples

Public Methods

Method Description
GetAllPackages ( ) : List

Get all packages from the CKAN group.

GetAllTags ( int limit ) : List

Get all tags from the CKAN group.

GetClient ( ) : CkanClient

Gets a CKAN client for the configured repository.

GetLicenseById ( string id ) : License

Get a license by id.

GetLicenses ( ) : List

Get the licenses from the repository. Caches the licenses for 1 hour as these don't update frequently. TODO: Implement common caching proxy for cachable requests.

GetPackageCount ( ) : int

Get the number of packages in the CKAN group.

GetPackageSearchSuggestions ( string prefix ) : List

Get search suggestions for all packages in the catalog group. Uses the all packages cache to build a search index that is also cached for performance.

Method Details

GetAllPackages() public static method

Get all packages from the CKAN group.
public static GetAllPackages ( ) : List
return List

GetAllTags() public static method

Get all tags from the CKAN group.
public static GetAllTags ( int limit ) : List
limit int
return List

GetClient() public static method

Gets a CKAN client for the configured repository.
public static GetClient ( ) : CkanClient
return CkanClient

GetLicenseById() public static method

Get a license by id.
public static GetLicenseById ( string id ) : License
id string
return License

GetLicenses() public static method

Get the licenses from the repository. Caches the licenses for 1 hour as these don't update frequently. TODO: Implement common caching proxy for cachable requests.
public static GetLicenses ( ) : List
return List

GetPackageCount() public static method

Get the number of packages in the CKAN group.
public static GetPackageCount ( ) : int
return int

GetPackageSearchSuggestions() public static method

Get search suggestions for all packages in the catalog group. Uses the all packages cache to build a search index that is also cached for performance.
public static GetPackageSearchSuggestions ( string prefix ) : List
prefix string
return List