rename User module to OAuth to match API methods

This commit is contained in:
stve 2015-02-09 22:09:29 -05:00
parent d66ab48a23
commit 9427881029
4 changed files with 6 additions and 7 deletions

View file

@ -2,7 +2,7 @@ require 'instapaper/api/account'
require 'instapaper/api/bookmark'
require 'instapaper/api/folder'
require 'instapaper/api/highlight'
require 'instapaper/api/user'
require 'instapaper/api/oauth'
module Instapaper
module API
@ -10,6 +10,6 @@ module Instapaper
include Instapaper::API::Bookmark
include Instapaper::API::Folder
include Instapaper::API::Highlight
include Instapaper::API::User
include Instapaper::API::OAuth
end
end

View file

@ -1,7 +1,7 @@
module Instapaper
module API
# Defines methods related to users
module User
# Defines methods related to OAuth
module OAuth
# Gets an OAuth access token for a user.
def access_token(username, password)
response = post('/api/1/oauth/access_token', {x_auth_username: username, x_auth_password: password, x_auth_mode: 'client_auth'}, true)

View file

@ -60,8 +60,7 @@ module Instapaper
attr_accessor :user_agent
attr_accessor :connection_options
# Creates a new API
# Creates a new Instapaper::Client
def initialize(options = {})
reset
options.keys.each do |key|

View file

@ -1,6 +1,6 @@
require 'spec_helper'
describe Instapaper::Client::User do
describe Instapaper::Client::OAuth do
let(:client) { Instapaper::Client.new }
describe '.access_token' do