postwill/postwill

View on GitHub
lib/postwill/providers/instagram.rb

Summary

Maintainability
A
0 mins
Test Coverage
module Postwill
  module Providers
    class Instagram < Base
      def initialize(options)
        @client ||= ::InstagramUpload::Client.new(options[:username], options[:password])
      end

      private

      def post(options)
        image = options[:image]
        text = options[:text]

        client.upload_photo(image, text)
      end
    end
  end
end