Personal Cloud Storage SDK for iOS Version 1.9 Release Guide

Release date 05/04/2017

Contents

Introduction

The following features are included in this release. Refer to the sections below for detailed listing of supported APIs.

The SDK Hubble Media Browser Kepler File Manager
Authentication and authorization Authentication and authorization Authentication and authorization
Account information Account information Account information
Contacts Contacts
Favorites Favorites
File and folder operations File and folder operations File and folder operations
File upload File upload
Logger
Media Media Media
Playlists Playlists
Shares* Shares*
Tags Tags
Trash can Trash can
Virtual Folder Virtual Folder

* Shares methods, createShare and fetchShare now include links to shared files in their responses.

The SDK

Supported API Calls

The gateway to access Personal Cloud Storage APIs is the PCAPISDK class. Included in this class are most main methods that you can use to make the API calls.

  • Authentication and Authorization

    • authenticateClient - this API is used to present OAuth 2.0 login screen. Based on the response from OAuth 2.0 login, the completion handler returns either the authorization code or an error message. You can exchange the authorization code for an access token and a refresh token. The access token will remain in the keychain until it expires or the user logs out.
    • fetchAccessToken - retrieves access token.
    • isUserLoggedIn - returns YES if the user has an access token
    • logout - logs the user out from the current session. Removes the access token that is stored in keychain. Returns YES if the token is successfully removed.
    • refreshSession - refreshes current session. Once the session has been refreshed, the authentication credentials are returned with the completion block.
  • Account Information

    • fetchAccountInfo - retrieves account information for a user’s account.
  • Contacts

    • createContact - allows you to create a new contact.
    • deleteContact - allows you to delete a contact.
    • fetchContacts - retrieves contacts.
    • updateContact - allows you to update a contact.
  • Favorites

    • deleteFavorites - deletes favorite tag.
    • getFavorites - retrieves favorite files and folders.
    • setFavorites - sets a favorite tag for a file or folder.
  • File and Folder Operations

    • copy - creates a copy of a file or folder.
    • createFolder - creates a folder at a given path.
    • deletePath - deletes a file or a folder at a specified path.
    • doFullSync - calls GET /fullview API to get changes from the server, then merges the changes with the local database
    • downloadFile | Downloads a file. The file is downloaded to a temporary directory and is removed once the api which downloaded the file is released. You should move the file to a different location in the completion callback.
    • downloadThumbnail - downloads thumbnail image of any file.
    • fetchMetadata - retrieves the metadata of a folder.
    • move - moves a file or folder.
    • rename - renames a file or a folder.
    • search - searches for any resource in local database.
    • uploadFile - uploads a file to a folder.
  • Logger

    PCAPILogger class contains methods that allow you to start, stop, add, and delete log levels:

    • addLogger - adds a log.
    • removeAllLogger - removes all logs.
    • removeLogger - removes specified log.
    • sharedLogger - returns shared logger instance.
    • startLogging - starts all managed logs.
    • stopLogging - stops all managed logs.
  • Media

    • getArtists - retrieves artists.
    • getAudioAlbums - retrieves audio albums.
    • getAudioPlaylists - retrieves audio playlists.
    • getAudios - retrieves audio files.
    • getDocuments - retrieves documents.
    • getGenres - retrieves genres.
    • getPhotoAlbums - retrieves photo albums.
    • getPhotos - retrieves image files.
    • getVideos - retrieves video files.
  • Playlists

    • addPlaylistItems - adds items to a playlist.
    • createPlaylist - creates a playlist.
    • deletePlaylist - deletes a playlists.
    • deletePlaylistItem - deletes an item in a playlist.
    • editPlaylistsDefinition - allows you to edit playlist definition.
    • editPlaylist - allows you to edit a playlist.
    • getPlaylist - retrieves a list of user’s playlists.
    • getPlaylistContent - retrieves content of a playlist.
    • getPlaylistDefinitioin - retrieves playlist definition.
    • getPlaylistItems - retrieves the information on all items for a given playlist.
  • Shares

    • createShare - creates a share.
    • deleteShare - deletes a share.
    • fetchShare - lists user’s shares.
  • Tags

    • deleteTags - deletes tags for a specified file or folder.
    • getTags - lists tags for a specified file or folder.
    • setTags - updates tags for a specified file or folder.
  • Trash Can

    • deleteTrash - permanently deletes all files and folder that are in a deleted state.
    • fetchTrash - retrieves a list of files and folders that have been deleted.
    • restore - restores files and folders that are marked as deleted.
  • Virtual Folder

    • createVirtualFolder - creates a virutal folder.
    • deleteVirtualFolder - deletes a virtual folder.
    • renameVirtualFolder - renames a virtual folder.

Classes

Hubble Media Browser

Supported API Calls

All methods listed below are included in the PCAPISDK class.

  • Authentication and Authorization

    • authenticateClient - this API is used to present OAuth 2.0 login screen. Based on the response from OAuth 2.0 login, the completion handler returns either the authorization code or an error message. You can exchange the authorization code for an access token and a refresh token. The access token will remain in the keychain until it expires or the user logs out.
    • logout - logs the user out from the current session. Removes the access token that is stored in keychain. Returns YES if the token is successfully removed.
    • refreshSession - refreshes current session. Once the session has been refreshed, the authentication credentials are returned with the completion block.
  • Account Information

    • fetchAccountInfo - retrieves account information for a user’s account.
  • Contacts

    • createContact - allows you to create a new contact.
    • deleteContact - allows you to delete a contact.
    • fetchContacts - retrieves contacts.
    • updateContact - allows you to update a contact.
  • File and Folder Operations

    • doFullSync - refreshes the local cache of files. This API first calls GET /fullview API to get the changes from the server, then merges the changes with the local database.
    • downloadFile - downloads a file. The file is downloaded to a temporary directory and is removed once the api which downloaded the file is released. You should move the file to a different location in the completion callback.
    • downloadThumbnail - downloads thumbnail image of any file.
    • search - searches for any resource in local database.
  • Media

    • getArtists - retrieves artists.
    • getAudioAlbums - retrieves audio albums.
    • getAudioPlaylists - retrieves audio playlists.
    • getAudios - retrieves audio files.
    • getGenres - retrieves genres.
    • getPhotoAlbum - retrieves photo albums.
    • getPhotos - retrieves image files.
    • getVideos - retrieves video files.
  • Playlists

    • addPlaylistItems - adds items to a playlist.
    • createPlaylist - creates a playlist.
    • deletePlaylist - deletes a playlists.
    • deletePlaylistItem - deletes an item in a playlist.
    • editPlaylist - allows you to edit a playlist.
    • getPlaylist - retrieves a list of user’s playlists.
    • getPlaylistItems - retrieves the information on all items for a given playlist.
  • Shares

    • createShare - creates a share.
    • deleteShare - deletes a share.
    • fetchShare - lists user’s shares.
  • Tags

    • deleteTags - deletes tags for a specified file or folder.
    • getTags - lists tags for a specified file or folder.
    • setTags - updates tags for a specified file or folder.

Kepler File Manager

Supported API Calls

All methods listed below are included in the PCAPISDK class.

  • Authentication and Authorization

    • authenticateClient - this API is used to present OAuth 2.0 login screen. Based on the response from OAuth 2.0 login, the completion handler returns either the authorization code or an error message. You can exchange the authorization code for an access token and a refresh token. The access token will remain in the keychain until it expires or the user logs out.
    • fetchAccessToken - retrieves access token.
    • isUserLoggedIn - verifies if the user is authorized.
    • logout - logs the user out from the current session. Removes the access token that is stored in keychain. Returns YES if the token is successfully removed.
  • Account Information

    • fetchAccountInfo - retrieves account information for a user’s account.
  • Favorites

    • deleteFavorites - deletes favorite tag.
    • getFavorites - retrieves favorite files and folders.
    • setFavorites - sets a favorite tag for a file or folder.
  • File and Folder Operations

    • copy - creates a copy of a file or folder.
    • createFolder - creates a folder at a given path.
    • delete - deletes a file or a folder at a specified path.
    • downloadFile - downloads a file. The file is downloaded to a temporary directory and is removed once the api which downloaded the file is released. You should move the file to a different location in the completion callback.
    • downloadThumbnail - downloads thumbnail image of any file.
    • fetchMetadata - retrieves the metadata of a folder.
    • move - moves a file or folder.
    • rename - renames a file or a folder.
    • search - searches for any resource in local database.
    • uploadFile - uploads a file to a folder.
  • Media

    • getAudios - retrieves audio files.
    • getDocuments - retrieves documents.
    • getPhotos - retrieves image files.
    • getVideos - retrieves vide files.
  • Trash Can

    • deleteTrash - permanently deletes all files and folder that are in a deleted state.
    • fetchTrash - retrieves a list of files and folders that have been deleted.
    • restore restores files and folders that are marked as deleted.
  • Virtual Folder

    • createVirtualFolder - creates a virutal folder.
    • deleteVirtualFolder - deletes a virtual folder.
    • renameVirtualFolder - renames a virtual folder.

Copyright © 2015-2017, Verizon and/or its Licensors. All rights reserved.