C# Класс BiasedBit.MinusEngine.MinusApi

Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
BASE_URL String
CREATE_GALLERY_URL System.Uri
GET_ITEMS_URL String
MY_GALLERIES_URL System.Uri
PAGE_BASE_URL String
PAGE_COOKIE String
SAVE_GALLERY_URL System.Uri
SIGN_IN_URL System.Uri
UPLOAD_ITEM_URL System.Uri
USER_AGENT String

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

Метод Описание
CreateGallery ( String cookieHeader ) : void

Creates an empty new gallery.

GetItems ( String cookieHeader, String galleryReaderId ) : void

Retrieve all items in a gallery, along with some other info (url and title).

MinusApi ( String apiKey ) : System

Default constructor.

MyGalleries ( String cookieHeader ) : void

Retrieve all of a users galleries

SaveGallery ( String cookieHeader, String name, String galleryEditorId, String key, String items ) : void

Saves a gallery and makes it publicly accessible.

SignIn ( ) : void

Sign in as guest

SignIn ( String username, String password ) : void

Signs into minus

UploadItem ( String cookieHeader, String editorId, String key, String filename, Stream data ) : void
UploadItem ( String cookieHeader, String editorId, String key, String filename, String desiredFilename = null ) : void

Uploads an item (image) to a given gallery. NOTE: This operations does NOT ensure that the item will be saved in the gallery. Saving is something that is done by the SaveGallery operation. Items that are uploaded are left in a transient state until they are saved via SaveGallery.

UrlEncode ( String parameter ) : String

Perform URL escaping on a string.

Приватные методы

Метод Описание
CreateAndSetupWebClient ( ) : CookieAwareWebClient
CreateAndSetupWebClient ( String cookieHeader ) : CookieAwareWebClient
PushData ( Stream input, Stream output ) : void
TriggerCreateGalleryComplete ( CreateGalleryResult result ) : void
TriggerCreateGalleryFailed ( Exception e ) : void
TriggerGetItemsComplete ( GetItemsResult result ) : void
TriggerGetItemsFailed ( Exception e ) : void
TriggerMyGalleriesComplete ( MyGalleriesResult result ) : void
TriggerMyGalleriesFailed ( Exception e ) : void
TriggerSaveGalleryComplete ( ) : void
TriggerSaveGalleryFailed ( Exception e ) : void
TriggerSignInComplete ( SignInResult result ) : void
TriggerSignInFailed ( Exception e ) : void
TriggerUploadItemComplete ( UploadItemResult result ) : void
TriggerUploadItemFailed ( Exception e ) : void

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

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

Creates an empty new gallery.
public CreateGallery ( String cookieHeader ) : void
cookieHeader String
Результат void

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

Retrieve all items in a gallery, along with some other info (url and title).
public GetItems ( String cookieHeader, String galleryReaderId ) : void
cookieHeader String
galleryReaderId String The reader id (public) of the gallery.
Результат void

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

Default constructor.
public MinusApi ( String apiKey ) : System
apiKey String The API Key assigned to your application.
Результат System

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

Retrieve all of a users galleries
public MyGalleries ( String cookieHeader ) : void
cookieHeader String A String representation of the session id cookie
Результат void

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

Saves a gallery and makes it publicly accessible.
public SaveGallery ( String cookieHeader, String name, String galleryEditorId, String key, String items ) : void
cookieHeader String
name String Desired name for the gallery.
galleryEditorId String Gallery editor ID (obtained when created).
key String Editor key for the gallery (obtained when created).
items String /// The order in which the items will be displayed in the gallery. /// /// If you fail to include items that were uploaded to this gallery, those items will be /// discarded by the server. ///
Результат void

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

Sign in as guest
public SignIn ( ) : void
Результат void

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

Signs into minus
public SignIn ( String username, String password ) : void
username String Username to sign in with.
password String Password to sign in with
Результат void

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

public UploadItem ( String cookieHeader, String editorId, String key, String filename, Stream data ) : void
cookieHeader String
editorId String
key String
filename String
data Stream
Результат void

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

Uploads an item (image) to a given gallery. NOTE: This operations does NOT ensure that the item will be saved in the gallery. Saving is something that is done by the SaveGallery operation. Items that are uploaded are left in a transient state until they are saved via SaveGallery.
public UploadItem ( String cookieHeader, String editorId, String key, String filename, String desiredFilename = null ) : void
cookieHeader String
editorId String Editor id of the gallery to which the item will be uploaded.
key String Key to the gallery.
filename String File location (full path) of the item to be uploaded.
desiredFilename String /// The desired filename for the item to be uploaded (defaults to null). /// If this parameter isn't provided, it will be taken from the filename param. /// Example: /// filename is "C:\files\file.png" and you want it to be uploded as "image.png" ///
Результат void

UrlEncode() публичный статический Метод

Perform URL escaping on a string.
public static UrlEncode ( String parameter ) : String
parameter String Input (unescaped) string.
Результат String

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

BASE_URL публичное статическое свойство

public static String BASE_URL
Результат String

CREATE_GALLERY_URL публичное статическое свойство

public static Uri,System CREATE_GALLERY_URL
Результат System.Uri

GET_ITEMS_URL публичное статическое свойство

public static String GET_ITEMS_URL
Результат String

MY_GALLERIES_URL публичное статическое свойство

public static Uri,System MY_GALLERIES_URL
Результат System.Uri

PAGE_BASE_URL публичное статическое свойство

public static String PAGE_BASE_URL
Результат String

PAGE_COOKIE публичное статическое свойство

public static String PAGE_COOKIE
Результат String

SAVE_GALLERY_URL публичное статическое свойство

public static Uri,System SAVE_GALLERY_URL
Результат System.Uri

SIGN_IN_URL публичное статическое свойство

public static Uri,System SIGN_IN_URL
Результат System.Uri

UPLOAD_ITEM_URL публичное статическое свойство

public static Uri,System UPLOAD_ITEM_URL
Результат System.Uri

USER_AGENT публичное статическое свойство

public static String USER_AGENT
Результат String