Skip to content

Commit 5675529

Browse files
author
dale.zhang
committed
MISC - Rename Contact.contact to Contact.contacts
1 parent 688e003 commit 5675529

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ client.messages_with_nextlink(next_link: true, params: { filter: "createdDateTim
5757
**Get all contact**
5858

5959
```ruby
60-
client.contact
60+
client.contacts
6161
```
6262

6363
## Copyright

lib/office365/rest/contact.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
module Office365
44
module REST
55
module Contact
6-
def contact
7-
contact_uri = ["/", Office365::API_VERSION, "/me/contacts"].join
8-
response = Request.new(access_token, debug: debug).get(contact_uri)
6+
def contacts
7+
contacts_uri = ["/", Office365::API_VERSION, "/me/contacts"].join
8+
response = Request.new(access_token, debug: debug).get(contacts_uri)
99

1010
response["value"].map { |v| Models::User.new(v) }
1111
end

spec/office365/client_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
end
3535

3636
it "returns my contacts" do
37-
response = VCR.use_cassette("office365_my_contact") { client.contact }
37+
response = VCR.use_cassette("office365_my_contact") { client.contacts }
3838

3939
expect(response.size).to eq(4)
4040
end

0 commit comments

Comments
 (0)