Skip to content

Commit 059b258

Browse files
committed
Alter endpoints for release & update method comments
1 parent 09aede7 commit 059b258

12 files changed

+165
-184
lines changed

src/helpers/alerts.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ object.init = function(wrapper) {
1111
};
1212

1313
/* functions */
14-
// List a single page of unread alerts (with optional sort options).
14+
// List a single page of unread alerts.
1515
//
16-
// See documentation for response array object fields: https://www.mc-market.org/wiki/ultimate-api-v1-alerts/
16+
// Response data: {}
1717
object.list = async function(sort_options) {
1818
return await this.wrapper.get(`/alerts`, sort_options);
1919
};
2020

21-
// List all pages of unread alerts (with optional sort options).
21+
// List all pages of unread alerts.
2222
//
23-
// See documentation for response array object fields: https://www.mc-market.org/wiki/ultimate-api-v1-alerts/
23+
// Response data: {}
2424
object.list_all = async function(sort_options) {
2525
return await this.wrapper.list_until(`/alerts`, () => true, sort_options);
2626
};
2727

28-
// List multiple pages of unread alerts (with optional sort options) until a condition is no longer met.
28+
// List multiple pages of unread alerts until a condition is no longer met.
2929
//
30-
// See documentation for response array object fields: https://www.mc-market.org/wiki/ultimate-api-v1-alerts/
30+
// Response data: {}
3131
object.list_until = async function(should_continue, sort_options) {
3232
return await this.wrapper.list_until(`/alerts`, should_continue, sort_options);
3333
};

src/helpers/conversations.js

+18-18
Original file line numberDiff line numberDiff line change
@@ -10,59 +10,59 @@ object.init = function(wrapper) {
1010
return this;
1111
};
1212

13-
// List a page of unread conversations (with optional sort options).
13+
// List a page of unread conversations.
1414
//
15-
// See documentation for response array object fields: https://www.mc-market.org/wiki/ultimate-api-v1-conversations/
15+
// Response data: {}
1616
object.list = async function(sort_options) {
1717
return await this.wrapper.get(`/conversations`, sort_options);
1818
};
1919

20-
// List all pages of unread conversations (with optional sort options).
20+
// List all pages of unread conversations.
2121
//
22-
// See documentation for response array object fields: https://www.mc-market.org/wiki/ultimate-api-v1-conversations/
22+
// Response data: {}
2323
object.list_all = async function(sort_options) {
2424
return await this.wrapper.list_until(`/conversations`, () => true, sort_options);
2525
};
2626

27-
// List multiple pages of unread conversations (with optional sort options) until a condition is no longer met.
27+
// List multiple pages of unread conversations until a condition is no longer met.
2828
//
29-
// See documentation for response array object fields: https://www.mc-market.org/wiki/ultimate-api-v1-conversations/
29+
// Response data: {}
3030
object.list_until = async function(should_continue, sort_options) {
3131
return await this.wrapper.list_until(`/conversations`, should_continue, sort_options);
3232
};
3333

34-
// Create a new conversation.
35-
object.create = async function(title, message, recipient_ids) {
34+
// Start a new conversation.
35+
//
36+
// Response data: {}
37+
object.start = async function(title, message, recipient_ids) {
3638
let body_data = {title: title, message: message, recipient_id: recipient_ids};
3739
return await this.wrapper.post(`/conversations`, body_data);
3840
};
3941

40-
// List a page of replies to an unread conversation (with optional sort options).
42+
// List a page of replies to an unread conversation.
4143
//
42-
// See documentation for response array object fields:
43-
// https://www.mc-market.org/wiki/ultimate-api-v1-conversations-replies/
44+
// Response data: {}
4445
object.list_replies = async function(conversation_id, sort_options) {
4546
return await this.wrapper.get(`/conversations/${conversation_id}/replies`, sort_options);
4647
};
4748

48-
// List all pages of replies to an unread conversation (with optional sort options).
49+
// List all pages of replies to an unread conversation.
4950
//
50-
// See documentation for response array object fields:
51-
// https://www.mc-market.org/wiki/ultimate-api-v1-conversations-replies/
51+
// Response data: {}
5252
object.list_replies_all = async function(conversation_id, sort_options) {
5353
return await this.wrapper.list_until(`/conversations/${conversation_id}/replies`, () => true, sort_options);
5454
};
5555

56-
// List multiple pages of replies to an unread conversation (with optional sort options) until a condition is no longer
57-
// met.
56+
// List multiple pages of replies to an unread conversation until a condition is no longer met.
5857
//
59-
// See documentation for response array object fields:
60-
// https://www.mc-market.org/wiki/ultimate-api-v1-conversations-replies/
58+
// Response data: {}
6159
object.list_replies_until = async function(conversation_id, should_continue, sort_options) {
6260
return await this.wrapper.list_until(`/conversations/${conversation_id}/replies`, should_continue, sort_options);
6361
};
6462

6563
// Reply to an unread conversation
64+
//
65+
// Response data: {}
6666
object.reply = async function(conversation_id, message) {
6767
return await this.wrapper.post(`/conversations/${conversation_id}/replies`, {message: message});
6868
};

src/helpers/members/members.js

+17-8
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,39 @@ object.init = function(wrapper) {
1515
};
1616

1717
/* functions */
18-
// Fetch detailed information about yourself.
18+
// Fetch information about yourself.
1919
//
20-
// See documentation for response object fields: https://www.mc-market.org/wiki/ultimate-api-v1-members/
20+
// Response data: {}
2121
object.self = async function() {
2222
return await this.wrapper.get(`/members/self`);
2323
};
2424

25-
// Fetch detailed information about a member.
25+
/* functions */
26+
// Modify information about yourself.
27+
//
28+
// Response data: {}
29+
object.modify_self = async function(about_me, custom_title, signature) {
30+
let body = {about_me: about_me, custom_title: custom_title, signature: signature};
31+
return await this.wrapper.patch(`/members/self`, body);
32+
};
33+
34+
// Fetch information about a member.
2635
//
27-
// See documentation for response object fields: https://www.mc-market.org/wiki/ultimate-api-v1-members/
36+
// Response data: {}
2837
object.fetch = async function(member_id) {
2938
return await this.wrapper.get(`/members/${member_id}`);
3039
};
3140

32-
// Fetch detailed information about a member by username.
41+
// Fetch information about a member by username.
3342
//
34-
// See documentation for response object fields: https://www.mc-market.org/wiki/ultimate-api-v1-members/
43+
// Response data: {}
3544
object.fetch_by_username = async function(username) {
36-
return await this.wrapper.get(`/members/username/${username}`);
45+
return await this.wrapper.get(`/members/usernames/${username}`);
3746
};
3847

3948
// Fetch a list of recently issued bans.
4049
//
41-
// See documentation for response object fields: https://www.mc-market.org/wiki/ultimate-api-v1-members/
50+
// Response data: {}
4251
object.bans = async function() {
4352
return await this.wrapper.get("/members/bans");
4453
};

src/helpers/members/profile_posts.js

+9-14
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,36 @@ object.init = function(wrapper) {
1111
};
1212

1313
/* functions */
14-
// List a page of profile posts on your profile (with optional sort options).
14+
// List a page of profile posts on your profile.
1515
//
16-
// See documentation for response array object fields:
17-
// https://www.mc-market.org/wiki/ultimate-api-v1-members-profile-posts/
16+
// Response data: {}
1817
object.list = async function(sort_options) {
1918
return await this.wrapper.get(`/members/self/profile-posts`, sort_options);
2019
};
2120

22-
// List all pages of profile posts on your profile (with optional sort options).
21+
// List all pages of profile posts on your profile.
2322
//
24-
// See documentation for response array object fields:
25-
// https://www.mc-market.org/wiki/ultimate-api-v1-members-profile-posts/
23+
// Response data: {}
2624
object.list_all = async function(sort_options) {
2725
return await this.wrapper.list_until(`/members/self/profile-posts`, () => true, sort_options);
2826
};
2927

30-
// List multiple pages of profile posts on your profile (with optional sort options) until a condition is no longer
31-
// met.
28+
// List multiple pages of profile posts on your profile until a condition is no longer met.
3229
//
33-
// See documentation for response array object fields:
34-
// https://www.mc-market.org/wiki/ultimate-api-v1-members-profile-posts/
30+
// Response data: {}
3531
object.list_until = async function(should_continue, sort_options) {
3632
return await this.wrapper.list_until(`/members/self/profile-posts`, should_continue, sort_options);
3733
};
3834

3935
// Fetch information about a profile post on your profile.
4036
//
41-
// See documentation for response array object fields:
42-
// https://www.mc-market.org/wiki/ultimate-api-v1-members-profile-posts/
37+
// Response data: {}
4338
object.fetch = async function(profile_post_id) {
4439
return await this.wrapper.get(`/members/self/profile-posts/${profile_post_id}`);
4540
};
4641

47-
// Edit a profile post on your profile that you've authored.
48-
object.edit = async function(profile_post_id, message) {
42+
// Modify a profile post on your profile that you've authored.
43+
object.modify = async function(profile_post_id, message) {
4944
return await this.wrapper.patch(`/members/self/profile-posts/${profile_post_id}`, {message: message});
5045
};
5146

src/helpers/resources/downloads.js

+18-30
Original file line numberDiff line numberDiff line change
@@ -11,83 +11,71 @@ object.init = function(wrapper) {
1111
};
1212

1313
/* functions */
14-
// List a page of downloads for a given resource (with optional sort options).
14+
// List a page of downloads for a given resource.
1515
//
16-
// See documentation for response array object fields:
17-
// https://www.mc-market.org/wiki/ultimate-api-v1-resources-downloads/
16+
// Response data: {}
1817
object.list = async function(resource_id, sort_options) {
1918
return await this.wrapper.get(`/resources/${resource_id}/downloads`, sort_options);
2019
};
2120

22-
// List all pages of downloads for a given resource (with optional sort options).
21+
// List all pages of downloads for a given resource.
2322
//
24-
// See documentation for response array object fields:
25-
// https://www.mc-market.org/wiki/ultimate-api-v1-resources-downloads/
23+
// Response data: {}
2624
object.list_all = async function(resource_id, sort_options) {
2725
return await this.wrapper.list_until(`/resources/${resource_id}/downloads`, () => true, sort_options);
2826
};
2927

30-
// List multiple pages of downloads for a given resource (with optional sort options) until a condition is no longer
31-
// met.
28+
// List multiple pages of downloads for a given resource until a condition is no longer met.
3229
//
33-
// See documentation for response array object fields:
34-
// https://www.mc-market.org/wiki/ultimate-api-v1-resources-downloads/
30+
// Response data: {}
3531
object.list_until = async function(resource_id, should_continue, sort_options) {
3632
return await this.wrapper.list_until(`/resources/${resource_id}/downloads`, should_continue, sort_options);
3733
};
3834

39-
// List a page of downloads by member for a given resource (with optional sort options).
35+
// List a page of downloads by member for a given resource.
4036
//
41-
// See documentation for response array object fields:
42-
// https://www.mc-market.org/wiki/ultimate-api-v1-resources-downloads/
37+
// Response data: {}
4338
object.list_by_member = async function(resource_id, member_id, sort_options) {
4439
return await this.wrapper.get(`/resources/${resource_id}/downloads/members/${member_id}`, sort_options);
4540
};
4641

47-
// List all pages of downloads by member for a given resource (with optional sort options).
42+
// List all pages of downloads by member for a given resource.
4843
//
49-
// See documentation for response array object fields:
50-
// https://www.mc-market.org/wiki/ultimate-api-v1-resources-downloads/
44+
// Response data: {}
5145
object.list_by_member_all = async function(resource_id, member_id, sort_options) {
5246
return await this.wrapper.list_until(
5347
`/resources/${resource_id}/downloads/members/${member_id}`, () => true, sort_options
5448
);
5549
};
5650

57-
// List multiple pages of downloads by member for a given resource (with optional sort options) until a condition is no
58-
// longer met.
51+
// List multiple pages of downloads by member for a given resource until a condition is no longer met.
5952
//
60-
// See documentation for response array object fields:
61-
// https://www.mc-market.org/wiki/ultimate-api-v1-resources-downloads/
53+
// Response data: {}
6254
object.list_by_member_until = async function(resource_id, member_id, should_continue, sort_options) {
6355
return await this.wrapper.list_until(
6456
`/resources/${resource_id}/downloads/members/${member_id}`, should_continue, sort_options
6557
);
6658
};
6759

68-
// List a page of downloads by version for a given resource (with optional sort options).
60+
// List a page of downloads by version for a given resource.
6961
//
70-
// See documentation for response array object fields:
71-
// https://www.mc-market.org/wiki/ultimate-api-v1-resources-downloads/
62+
// Response data: {}
7263
object.list_by_version = async function(resource_id, version_id, sort_options) {
7364
return await this.wrapper.get(`/resources/${resource_id}/downloads/versions/${version_id}`, sort_options);
7465
};
7566

76-
// List all pages of downloads by version for a given resource (with optional sort options).
67+
// List all pages of downloads by version for a given resource.
7768
//
78-
// See documentation for response array object fields:
79-
// https://www.mc-market.org/wiki/ultimate-api-v1-resources-downloads/
69+
// Response data: {}
8070
object.list_by_version_all = async function(resource_id, version_id, sort_options) {
8171
return await this.wrapper.list_until(
8272
`/resources/${resource_id}/downloads/versions/${version_id}`, () => true, sort_options
8373
);
8474
};
8575

86-
// List multiple pages of downloads by version for a given resource (with optional sort options) until a condition is
87-
// no longer met.
76+
// List multiple pages of downloads by version for a given resource until a condition is no longer met.
8877
//
89-
// See documentation for response array object fields:
90-
// https://www.mc-market.org/wiki/ultimate-api-v1-resources-downloads/
78+
// Response data: {}
9179
object.list_by_version_until = async function(resource_id, version_id, should_continue, sort_options) {
9280
return await this.wrapper.list_until(
9381
`/resources/${resource_id}/downloads/versions/${version_id}`, should_continue, sort_options

0 commit comments

Comments
 (0)