Skip to content

Commit

Permalink
Merge pull request nylas#214 from nylas/ip_addresses
Browse files Browse the repository at this point in the history
adding ip_addresses endpoint
  • Loading branch information
amanda103 authored Mar 27, 2019
2 parents b036178 + aea7175 commit e8d635d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@
Gemfile.lock
gemfiles/*.lock
InstalledFiles
.idea/
_yardoc
coverage
doc/
lib/bundler/man
pkg
rdoc
.ruby-version
spec/reports
test/tmp
test/version_tmp
Expand Down
8 changes: 8 additions & 0 deletions lib/nylas/api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ def revoke(access_token)
response.code == 200 && response.empty?
end

# Returns list of IP addresses
# @return [Hash]
# hash has keys of :updated_at (unix timestamp) and :ip_addresses (array of strings)
def ip_addresses
path = "/a/#{app_id}/ip_addresses"
client.as(client.app_secret).get(path: path)
end

# @param message [Hash, String, #send!]
# @return [Message] The resulting message
def send!(message)
Expand Down

0 comments on commit e8d635d

Please sign in to comment.