mastodon-api 0.9.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/mastodon/error.rb +1 -1
- data/lib/mastodon/headers.rb +1 -1
- data/lib/mastodon/relationship.rb +7 -7
- data/lib/mastodon/rest/accounts.rb +1 -1
- data/lib/mastodon/rest/statuses.rb +1 -1
- data/lib/mastodon/version.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b75d05c33297c3b669a07e9f15f6c5142c532e77
|
4
|
+
data.tar.gz: afb5dae6393fff36eb4b354f3c37daaa1dd8daf4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f01d0635100a30195c30ef2ab86162b176f7f3f340d97a5df58b48fcb0425acd4da38eaeb5f2a8cc28adbe730f5eddf89171659693b28780d98466fbbf985dc
|
7
|
+
data.tar.gz: 95ac9a9d64733f05518565d65822e27f1cf66b116d7416850076dceb34d2bb2ab63e3c4339e68aa97ac051f193b58c558730a5ed44afc5e77f18344739e88514
|
data/lib/mastodon/error.rb
CHANGED
@@ -22,7 +22,7 @@ module Mastodon
|
|
22
22
|
500 => Mastodon::Error::InternalServerError,
|
23
23
|
502 => Mastodon::Error::BadGateway,
|
24
24
|
503 => Mastodon::Error::ServiceUnavailable,
|
25
|
-
504 => Mastodon::Error::GatewayTimeout
|
25
|
+
504 => Mastodon::Error::GatewayTimeout,
|
26
26
|
}.freeze
|
27
27
|
|
28
28
|
class << self
|
data/lib/mastodon/headers.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
module Mastodon
|
2
2
|
class Relationship < Mastodon::Base
|
3
3
|
# @!attribute [r] id
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
# @return [Integer] Account ID
|
5
|
+
# @!attribute [r] following?
|
6
|
+
# @return [Boolean]
|
7
|
+
# @!attribute [r] followed_by?
|
8
|
+
# @return [Boolean]
|
9
|
+
# @!attribute [r] blocking?
|
10
|
+
# @return [Boolean]
|
11
11
|
|
12
12
|
normal_attr_reader :id
|
13
13
|
predicate_attr_reader :following, :followed_by, :blocking
|
@@ -37,7 +37,7 @@ module Mastodon
|
|
37
37
|
# @param uri [String] The URI of the remote user, in the format of username@domain
|
38
38
|
# @return [Mastodon::Account]
|
39
39
|
def follow_by_uri(uri)
|
40
|
-
perform_request_with_object(:post,
|
40
|
+
perform_request_with_object(:post, '/api/v1/follows', { uri: uri }, Mastodon::Account)
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
@@ -12,7 +12,7 @@ module Mastodon
|
|
12
12
|
# @param media_ids [Array<Integer>]
|
13
13
|
# @return [Mastodon::Status]
|
14
14
|
def create_status(text, in_reply_to_id = nil, media_ids = [])
|
15
|
-
perform_request_with_object(:post,
|
15
|
+
perform_request_with_object(:post, '/api/v1/statuses', array_param(:media_ids, media_ids).merge(status: text, in_reply_to_id: in_reply_to_id), Mastodon::Status)
|
16
16
|
end
|
17
17
|
|
18
18
|
# Retrieve status
|
data/lib/mastodon/version.rb
CHANGED