class Chute::V2::Albums

Public Class Methods

add_assets(album_id, *asset_ids) click to toggle source
# File lib/chute/v2/albums.rb, line 54
def add_assets(album_id, *asset_ids)
  Chute::Client.post("/v2/albums/#{album_id}/add_assets", asset_ids: asset_ids)
end
all(page=nil, per_page=nil) click to toggle source

Album Listing

# File lib/chute/v2/albums.rb, line 6
def all(page=nil, per_page=nil)
  Chute::Client.get("/v2/albums", page: page, per_page: per_page)
end
assets(id, page, per_page) click to toggle source

Album Assets

# File lib/chute/v2/albums.rb, line 21
def assets(id, page, per_page)
  Chute::Client.get("/v2/albums/#{id}/assets", page: page, per_page: per_page)
end
copy_asset(album_id, asset_id, to_album) click to toggle source

Copy asset from one album to another, carrying over all asset's metadata

# File lib/chute/v2/albums.rb, line 68
def copy_asset(album_id, asset_id, to_album)
  Chute::Client.post("/v2/albums/#{album_id}/assets/#{asset_id}/copy/#{to_album}")
end
create(album) click to toggle source

Album Create

# File lib/chute/v2/albums.rb, line 36
def create(album)
  Chute::Client.post("/v2/albums", album: album)
end
delete(id) click to toggle source

Album Delete

# File lib/chute/v2/albums.rb, line 46
def delete(id)
  Chute::Client.delete("/v2/albums/#{id}")
end
find(id) click to toggle source

Album Details

# File lib/chute/v2/albums.rb, line 11
def find(id)
  Chute::Client.get("/v2/albums/#{id}")
end
geo_locate(id, lat, lng, radius) click to toggle source

Album Assets Geo Search

# File lib/chute/v2/albums.rb, line 16
def geo_locate(id, lat, lng, radius)
  Chute::Client.get("/v2/albums/#{id}/assets/geo/#{lat},#{lng}/#{radius}")
end
import(album_id, *urls) click to toggle source

Import Album Assets

# File lib/chute/v2/albums.rb, line 26
def import(album_id, *urls)
  Chute::Client.post("/v2/albums/#{album_id}/assets/import", urls: urls)
end
import_from_instagram(album_id, *ids) click to toggle source

Import from Instagram Ids

# File lib/chute/v2/albums.rb, line 31
def import_from_instagram(album_id, *ids)
  Chute::Client.post("/v2/albums/#{album_id}/assets/import", instagram_ids: ids)
end
move_asset(album_id, asset_id, to_album) click to toggle source

Move asset from one album to another, preserving all asset's metadata

# File lib/chute/v2/albums.rb, line 63
def move_asset(album_id, asset_id, to_album)
  Chute::Client.post("/v2/albums/#{album_id}/assets/#{asset_id}/move/#{to_album}")
end
remove_assets(album_id, *asset_ids) click to toggle source
# File lib/chute/v2/albums.rb, line 58
def remove_assets(album_id, *asset_ids)
  Chute::Client.post("/v2/albums/#{album_id}/remove_assets",asset_ids: asset_ids)
end
stats(album_id) click to toggle source
# File lib/chute/v2/albums.rb, line 50
def stats(album_id)
  Chute::Client.get("/v2/albums/#{album_id}/stats")
end
update(id, album={}) click to toggle source

Album Update

# File lib/chute/v2/albums.rb, line 41
def update(id, album={})
  Chute::Client.put("/v2/albums/#{id}", album: album)
end