Sha256: 15470262f16d02914038d8ce31340ca09236d70d3fc3d144df19e2a4f304aa3c

Contents?: true

Size: 477 Bytes

Versions: 16

Compression:

Stored size: 477 Bytes

Contents

module Wework
  module Api
    module Methods
      module Media
        # public API
        def media_upload(type, file)
          post_file 'media/upload', file, params: { type: type }
        end

        def media_get(media_id)
          get 'media/get', params: { media_id: media_id }, as: :file
        end

        def get_media_url(media_id)
          "#{API_ENDPOINT}media/get?access_token=#{access_token}&media_id=#{media_id}"
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
wework-next-1.2.6 lib/wework/api/methods/media.rb
wework-1.2.8 lib/wework/api/methods/media.rb
wework-1.2.5 lib/wework/api/methods/media.rb
wework-1.2.3 lib/wework/api/methods/media.rb
wework-1.2.2 lib/wework/api/methods/media.rb
wework-1.2.1 lib/wework/api/methods/media.rb
wework-1.2.0 lib/wework/api/methods/media.rb
wework-1.1.9 lib/wework/api/methods/media.rb
wework-1.1.8 lib/wework/api/methods/media.rb
wework-1.1.7 lib/wework/api/methods/media.rb
wework-1.1.6 lib/wework/api/methods/media.rb
wework-1.1.5 lib/wework/api/methods/media.rb
wework-1.1.3 lib/wework/api/methods/media.rb
wework-1.1.2 lib/wework/api/methods/media.rb
wework-1.1.1 lib/wework/api/methods/media.rb
wework-1.1.0 lib/wework/api/methods/media.rb