pluralize API modules so filenames aren't the same

This commit is contained in:
stve 2015-02-10 21:41:20 -05:00
parent 366a963be8
commit 169a5f0dd9
9 changed files with 16 additions and 16 deletions

View file

@ -1,16 +1,16 @@
require 'instapaper/api/account' require 'instapaper/api/accounts'
require 'instapaper/api/bookmark' require 'instapaper/api/bookmarks'
require 'instapaper/api/folder' require 'instapaper/api/folders'
require 'instapaper/api/highlight' require 'instapaper/api/highlights'
require 'instapaper/api/oauth' require 'instapaper/api/oauth'
require 'instapaper/api/utils' require 'instapaper/api/utils'
module Instapaper module Instapaper
module API module API
include Instapaper::API::Account include Instapaper::API::Accounts
include Instapaper::API::Bookmark include Instapaper::API::Bookmarks
include Instapaper::API::Folder include Instapaper::API::Folders
include Instapaper::API::Highlight include Instapaper::API::Highlights
include Instapaper::API::OAuth include Instapaper::API::OAuth
include Instapaper::API::Utils include Instapaper::API::Utils
end end

View file

@ -3,7 +3,7 @@ require 'instapaper/user'
module Instapaper module Instapaper
module API module API
# Defines methods related to accounts # Defines methods related to accounts
module Account module Accounts
# Returns the currently logged in user. # Returns the currently logged in user.
def verify_credentials def verify_credentials
perform_post_with_object('/api/1/account/verify_credentials', {}, Instapaper::User) perform_post_with_object('/api/1/account/verify_credentials', {}, Instapaper::User)

View file

@ -3,7 +3,7 @@ require 'instapaper/bookmark'
module Instapaper module Instapaper
module API module API
# Defines methods related to bookmarks # Defines methods related to bookmarks
module Bookmark module Bookmarks
# Lists the user's unread bookmarks, and can also synchronize reading positions. # Lists the user's unread bookmarks, and can also synchronize reading positions.
# @option limit: Optional. A number between 1 and 500, default 25. # @option limit: Optional. A number between 1 and 500, default 25.
# @option folder_id: Optional. Possible values are unread (default), starred, archive, or a folder_id value from /api/1/folders/list. # @option folder_id: Optional. Possible values are unread (default), starred, archive, or a folder_id value from /api/1/folders/list.

View file

@ -3,7 +3,7 @@ require 'instapaper/folder'
module Instapaper module Instapaper
module API module API
# Defines methods related to folders # Defines methods related to folders
module Folder module Folders
# List the account's user-created folders. # List the account's user-created folders.
# @note This only includes organizational folders and does not include RSS-feed folders or starred-subscription folders # @note This only includes organizational folders and does not include RSS-feed folders or starred-subscription folders
def folders def folders

View file

@ -3,7 +3,7 @@ require 'instapaper/highlight'
module Instapaper module Instapaper
module API module API
# Defines methods related to highlights # Defines methods related to highlights
module Highlight module Highlights
# List highlights for a bookmark # List highlights for a bookmark
def highlights(bookmark_id) def highlights(bookmark_id)
perform_post_with_objects("/api/1.1/bookmarks/#{bookmark_id}/highlights", {}, Instapaper::Highlight) perform_post_with_objects("/api/1.1/bookmarks/#{bookmark_id}/highlights", {}, Instapaper::Highlight)

View file

@ -1,6 +1,6 @@
require 'spec_helper' require 'spec_helper'
describe Instapaper::Client::Account do describe Instapaper::Client::Accounts do
let(:client) { Instapaper::Client.new } let(:client) { Instapaper::Client.new }
describe '.verify_credentials' do describe '.verify_credentials' do

View file

@ -1,6 +1,6 @@
require 'spec_helper' require 'spec_helper'
describe Instapaper::Client::Bookmark do describe Instapaper::Client::Bookmarks do
let(:client) { Instapaper::Client.new(consumer_key: 'CK', consumer_secret: 'CS', oauth_token: 'OT', oauth_token_secret: 'OS') } let(:client) { Instapaper::Client.new(consumer_key: 'CK', consumer_secret: 'CS', oauth_token: 'OT', oauth_token_secret: 'OS') }
describe '#bookmarks' do describe '#bookmarks' do

View file

@ -1,6 +1,6 @@
require 'spec_helper' require 'spec_helper'
describe Instapaper::Client::Folder do describe Instapaper::Client::Folders do
let(:client) { Instapaper::Client.new(consumer_key: 'CK', consumer_secret: 'CS', oauth_token: 'OT', oauth_token_secret: 'OS') } let(:client) { Instapaper::Client.new(consumer_key: 'CK', consumer_secret: 'CS', oauth_token: 'OT', oauth_token_secret: 'OS') }
describe '#folders' do describe '#folders' do

View file

@ -1,6 +1,6 @@
require 'spec_helper' require 'spec_helper'
describe Instapaper::Client::Highlight do describe Instapaper::Client::Highlights do
let(:client) { Instapaper::Client.new(consumer_key: 'CK', consumer_secret: 'CS', oauth_token: 'OT', oauth_token_secret: 'OS') } let(:client) { Instapaper::Client.new(consumer_key: 'CK', consumer_secret: 'CS', oauth_token: 'OT', oauth_token_secret: 'OS') }
describe '#highlights' do describe '#highlights' do