Class: Odnoklassniki::REST::Mediatopic::Photoalbum
- Inherits:
-
Object
- Object
- Odnoklassniki::REST::Mediatopic::Photoalbum
- Defined in:
- lib/odnoklassniki/rest/mediatopic/photoalbum.rb
Constant Summary collapse
- GET_ALBUMS_METHOD =
'photos.getAlbums'
- CREATE_ALBUM_METHOD =
'photos.createAlbum'
- GET_ALBUM_UPLOAD_URL_METHOD =
'photosV2.getUploadUrl'
- COMMIT_PHOTO_METHOD =
'photosV2.commit'
- ALBUM_NAME =
'apiok'
- ALBUM_CREATION_OPTIONS =
{ title: ALBUM_NAME, description: 'Album for uploads from odnoklassniki api gem', type: 'public' }
Instance Attribute Summary collapse
-
#params ⇒ Object
Returns the value of attribute params.
Instance Method Summary collapse
-
#initialize(options) ⇒ Photoalbum
constructor
Options: account: { id: Identifier for account in OK, type: :group/:personal } client: Client for specified account.
- #upload(photo) ⇒ Object
Constructor Details
#initialize(options) ⇒ Photoalbum
Options: account: { id: Identifier for account in OK,
type: :group/:personal }
client: Client for specified account
30 31 32 33 34 |
# File 'lib/odnoklassniki/rest/mediatopic/photoalbum.rb', line 30 def initialize() @options = Odnoklassniki::Utils._symbolize_keys() @account = @options[:account] @api = @options[:client] end |
Instance Attribute Details
#params ⇒ Object
Returns the value of attribute params.
24 25 26 |
# File 'lib/odnoklassniki/rest/mediatopic/photoalbum.rb', line 24 def params @params end |
Instance Method Details
#upload(photo) ⇒ Object
36 37 38 |
# File 'lib/odnoklassniki/rest/mediatopic/photoalbum.rb', line 36 def upload(photo) upload_photoalbum_photo(photo) end |