C# Class BiasedBit.MinusEngine.MinusApi

Afficher le fichier Open project: koffeinfrei/MinusShare Class Usage Examples

Méthodes publiques

Свойство 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

Méthodes publiques

Méthode 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

Méthode 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 méthode

Creates an empty new gallery.
public CreateGallery ( String cookieHeader ) : void
cookieHeader String
Résultat void

GetItems() public méthode

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.
Résultat void

MinusApi() public méthode

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

MyGalleries() public méthode

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

SaveGallery() public méthode

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. ///
Résultat void

SignIn() public méthode

Sign in as guest
public SignIn ( ) : void
Résultat void

SignIn() public méthode

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

UploadItem() public méthode

public UploadItem ( String cookieHeader, String editorId, String key, String filename, Stream data ) : void
cookieHeader String
editorId String
key String
filename String
data Stream
Résultat void

UploadItem() public méthode

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" ///
Résultat void

UrlEncode() public static méthode

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

Property Details

BASE_URL public_oe static_oe property

public static String BASE_URL
Résultat String

CREATE_GALLERY_URL public_oe static_oe property

public static Uri,System CREATE_GALLERY_URL
Résultat System.Uri

GET_ITEMS_URL public_oe static_oe property

public static String GET_ITEMS_URL
Résultat String

MY_GALLERIES_URL public_oe static_oe property

public static Uri,System MY_GALLERIES_URL
Résultat System.Uri

PAGE_BASE_URL public_oe static_oe property

public static String PAGE_BASE_URL
Résultat String

PAGE_COOKIE public_oe static_oe property

public static String PAGE_COOKIE
Résultat String

SAVE_GALLERY_URL public_oe static_oe property

public static Uri,System SAVE_GALLERY_URL
Résultat System.Uri

SIGN_IN_URL public_oe static_oe property

public static Uri,System SIGN_IN_URL
Résultat System.Uri

UPLOAD_ITEM_URL public_oe static_oe property

public static Uri,System UPLOAD_ITEM_URL
Résultat System.Uri

USER_AGENT public_oe static_oe property

public static String USER_AGENT
Résultat String