C# Class BiasedBit.MinusEngine.MinusApi

Datei anzeigen Open project: koffeinfrei/MinusShare Class Usage Examples

Public Properties

Property Type Description
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

Public Methods

Method Description
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.

Private Methods

Method Description
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

Method Details

CreateGallery() public method

Creates an empty new gallery.
public CreateGallery ( String cookieHeader ) : void
cookieHeader String
return void

GetItems() public method

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.
return void

MinusApi() public method

Default constructor.
public MinusApi ( String apiKey ) : System
apiKey String The API Key assigned to your application.
return System

MyGalleries() public method

Retrieve all of a users galleries
public MyGalleries ( String cookieHeader ) : void
cookieHeader String A String representation of the session id cookie
return void

SaveGallery() public method

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. ///
return void

SignIn() public method

Sign in as guest
public SignIn ( ) : void
return void

SignIn() public method

Signs into minus
public SignIn ( String username, String password ) : void
username String Username to sign in with.
password String Password to sign in with
return void

UploadItem() public method

public UploadItem ( String cookieHeader, String editorId, String key, String filename, Stream data ) : void
cookieHeader String
editorId String
key String
filename String
data Stream
return void

UploadItem() public method

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" ///
return void

UrlEncode() public static method

Perform URL escaping on a string.
public static UrlEncode ( String parameter ) : String
parameter String Input (unescaped) string.
return String

Property Details

BASE_URL public_oe static_oe property

public static String BASE_URL
return String

CREATE_GALLERY_URL public_oe static_oe property

public static Uri,System CREATE_GALLERY_URL
return System.Uri

GET_ITEMS_URL public_oe static_oe property

public static String GET_ITEMS_URL
return String

MY_GALLERIES_URL public_oe static_oe property

public static Uri,System MY_GALLERIES_URL
return System.Uri

PAGE_BASE_URL public_oe static_oe property

public static String PAGE_BASE_URL
return String

PAGE_COOKIE public_oe static_oe property

public static String PAGE_COOKIE
return String

SAVE_GALLERY_URL public_oe static_oe property

public static Uri,System SAVE_GALLERY_URL
return System.Uri

SIGN_IN_URL public_oe static_oe property

public static Uri,System SIGN_IN_URL
return System.Uri

UPLOAD_ITEM_URL public_oe static_oe property

public static Uri,System UPLOAD_ITEM_URL
return System.Uri

USER_AGENT public_oe static_oe property

public static String USER_AGENT
return String