shep 0.1.0.pre.alpha0

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.
Files changed (67) hide show
  1. checksums.yaml +7 -0
  2. data/Copyright.txt +8 -0
  3. data/LICENSE.txt +697 -0
  4. data/README.md +101 -0
  5. data/Rakefile +52 -0
  6. data/doc/Shep/Entity/Account.html +193 -0
  7. data/doc/Shep/Entity/Context.html +165 -0
  8. data/doc/Shep/Entity/CustomEmoji.html +171 -0
  9. data/doc/Shep/Entity/MediaAttachment.html +175 -0
  10. data/doc/Shep/Entity/Notification.html +171 -0
  11. data/doc/Shep/Entity/Status.html +217 -0
  12. data/doc/Shep/Entity/StatusSource.html +167 -0
  13. data/doc/Shep/Entity/Status_Application.html +167 -0
  14. data/doc/Shep/Entity/Status_Mention.html +169 -0
  15. data/doc/Shep/Entity/Status_Tag.html +165 -0
  16. data/doc/Shep/Entity.html +1457 -0
  17. data/doc/Shep/Error/Caller.html +147 -0
  18. data/doc/Shep/Error/Http.html +329 -0
  19. data/doc/Shep/Error/Remote.html +143 -0
  20. data/doc/Shep/Error/Server.html +147 -0
  21. data/doc/Shep/Error/Type.html +233 -0
  22. data/doc/Shep/Error.html +149 -0
  23. data/doc/Shep/Session.html +4094 -0
  24. data/doc/Shep.html +128 -0
  25. data/doc/_index.html +300 -0
  26. data/doc/class_list.html +51 -0
  27. data/doc/css/common.css +1 -0
  28. data/doc/css/full_list.css +58 -0
  29. data/doc/css/style.css +497 -0
  30. data/doc/file.README.html +159 -0
  31. data/doc/file_list.html +56 -0
  32. data/doc/frames.html +17 -0
  33. data/doc/index.html +300 -0
  34. data/doc/js/app.js +314 -0
  35. data/doc/js/full_list.js +216 -0
  36. data/doc/js/jquery.js +4 -0
  37. data/doc/method_list.html +387 -0
  38. data/doc/top-level-namespace.html +110 -0
  39. data/lib/shep/entities.rb +164 -0
  40. data/lib/shep/entity_base.rb +378 -0
  41. data/lib/shep/exceptions.rb +78 -0
  42. data/lib/shep/session.rb +970 -0
  43. data/lib/shep/typeboxes.rb +180 -0
  44. data/lib/shep.rb +22 -0
  45. data/run_rake_test.example.sh +46 -0
  46. data/shep.gemspec +28 -0
  47. data/spec/data/smallimg.jpg +0 -0
  48. data/spec/data/smallish.jpg +0 -0
  49. data/spec/entity_common.rb +120 -0
  50. data/spec/entity_t1_spec.rb +168 -0
  51. data/spec/entity_t2_spec.rb +123 -0
  52. data/spec/entity_t3_spec.rb +30 -0
  53. data/spec/json_objects/account.1.json +25 -0
  54. data/spec/json_objects/account.2.json +36 -0
  55. data/spec/json_objects/status.1.json +85 -0
  56. data/spec/json_objects/status.2.json +59 -0
  57. data/spec/json_objects/status.3.json +95 -0
  58. data/spec/json_objects/status.4.json +95 -0
  59. data/spec/json_objects/status.5.json +74 -0
  60. data/spec/json_objects/status.6.json +140 -0
  61. data/spec/json_objects/status.7.json +84 -0
  62. data/spec/session_reader_1_unauth_spec.rb +366 -0
  63. data/spec/session_reader_2_auth_spec.rb +96 -0
  64. data/spec/session_writer_spec.rb +183 -0
  65. data/spec/spec_helper.rb +73 -0
  66. data/yard_helper.rb +30 -0
  67. metadata +154 -0
data/README.md ADDED
@@ -0,0 +1,101 @@
1
+ # Shep: Simple Http intErface to Pmastodon
2
+
3
+ Shep is a library that provides access to the Mastodon web API. It is
4
+ an alternative to the
5
+ [official Mastodon API Gem](https://rubygems.org/gems/mastodon-api/versions/2.0.0).
6
+
7
+ Pros:
8
+
9
+ * It has no dependencies other than stock Ruby 3.0.x or later. (It's
10
+ also been seen to work on JRuby-9.4.2.0.)
11
+ * Its unit tests do not require a dedicated Mastodon instance and will
12
+ work with just a scratch user account (and partially without even
13
+ that).
14
+ * It's a bit more "batteries included" than the official gem tries to
15
+ do more for you.
16
+ * It supports [Contexts](https://docs.joinmastodon.org/methods/statuses/#context).
17
+
18
+ Cons:
19
+
20
+ * It supports much less of the API than the offical gem.
21
+ * Its author thinks metaprogramming is cool.
22
+
23
+ ## Some Quick Examples:
24
+
25
+ Here's the canonical use case, retrieving cat pictures:
26
+
27
+ require 'shep'
28
+
29
+ HOST = "... name of mastodon host goes here..."
30
+
31
+ ss = Shep::Session.new(host: HOST)
32
+
33
+ ss.each_tag_status('caturday', only_media: true, limit: 10) { |status|
34
+ ss.fetch_status_with_media(status.id, media_dir = 'cat_pix')
35
+ }
36
+
37
+ And, of course, uploading cat pictures:
38
+
39
+ require 'shep'
40
+
41
+ HOST = "... name of mastodon host goes here..."
42
+ TOKEN = "...token goes here..."
43
+
44
+ ss = Shep::Session.new(host: HOST, token: TOKEN)
45
+
46
+ img_obj = ss.upload_media("cat.jpg",
47
+ content_type: 'image/jpeg',
48
+ description: "A cat.")
49
+
50
+ post = ss.post_status("Here is a picture of a cat.",
51
+ spoiler_text: "cat pic",
52
+ visibility: :public,
53
+ media_ids: [img_obj.id])
54
+
55
+ puts "Cat picture posted: #{post.url}"
56
+
57
+ It can also be used for other things.
58
+
59
+
60
+ ## Installation
61
+
62
+ The usual way to install Shep is via gem:
63
+
64
+ $ gem install shep
65
+
66
+ Alternately, you can fetch this repo and add it to your Ruby path.
67
+
68
+ If you wish to develop Shep, you'll also need Rake, YARD, and RSpec.
69
+
70
+
71
+ ## Testing
72
+
73
+ The tests are somewhat clever in that if there isn't a Mastodon
74
+ instance available or if you don't have a writable account on it, it
75
+ will still try to run tests that don't need those things.
76
+
77
+ On they other hand, some of the tests will fail if (e.g.) an account
78
+ doesn't have enough statuses with attached pictures. I've tried to
79
+ document this when it happens. Usually, a test will fail rather than
80
+ let a part of the code go untested.
81
+
82
+ The tests get credentials from the environment. Normally, I run
83
+ `rake test` from a script that first sets those variables to useful
84
+ values.
85
+
86
+ The file `run_rake_test.example.sh` documents these variables and what
87
+ they do.
88
+
89
+
90
+ ## License and Warranty
91
+
92
+ Shep is available under the terms of the GNU Affero GPL Version 3 plus
93
+ an exemption that allows you to release programs that use it under
94
+ your own terms.
95
+
96
+ It is offered **WITHOUT WARRANTY OF ANY KIND**. If it breaks, you get to keep
97
+ the pieces.
98
+
99
+ While it is not legally required or enforcable, you are nontheless
100
+ honour-bound to use Shep only for good and never for evil.
101
+
data/Rakefile ADDED
@@ -0,0 +1,52 @@
1
+
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+ require 'yard'
6
+ rescue LoadError => e
7
+ # no rspec available
8
+ puts "Missing module: #{e}"
9
+ puts "Quitting."
10
+ end
11
+
12
+ task :default => :doc # for now
13
+
14
+ task :test => :spec
15
+
16
+ task :gem => [:doc] do
17
+ sh "gem build shep"
18
+ end
19
+
20
+ RSpec::Core::RakeTask.new(:spec) do |t|
21
+ t.rspec_opts = "--fail-fast -f d"
22
+ end
23
+
24
+ YARD::Rake::YardocTask.new(:doc) do |t|
25
+ # We skip lib/shep/typeboxes.rb because that's completely
26
+ # internal.
27
+ t.files = %w{lib/shep.rb
28
+ lib/shep/exceptions.rb
29
+ lib/shep/entity_base.rb
30
+ lib/shep/entities.rb
31
+ lib/shep/session.rb
32
+ -
33
+ README.md
34
+ }
35
+
36
+ t.options = ['--no-private', # Hide the irrelevant crap
37
+ '--markup=markdown', # Markdown is nice
38
+ '-e', 'yard_helper.rb', # Hacky self-documenting Entities
39
+ ]
40
+ end
41
+
42
+
43
+ task :clean do
44
+ rm_rf "doc"
45
+
46
+ gems = Dir.glob("shep*.gem")
47
+ rm gems unless gems.empty?
48
+ end
49
+
50
+ task :clobber => [:clean] do
51
+ rm_rf ".yardoc"
52
+ end
@@ -0,0 +1,193 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Shep::Entity::Account
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Shep::Entity::Account";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (A)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Shep.html" title="Shep (module)">Shep</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Entity.html" title="Shep::Entity (class)">Entity</a></span></span>
41
+ &raquo;
42
+ <span class="title">Account</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Shep::Entity::Account
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="../Entity.html" title="Shep::Entity (class)">Shep::Entity</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="../Entity.html" title="Shep::Entity (class)">Shep::Entity</a></span></li>
78
+
79
+ <li class="next">Shep::Entity::Account</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/shep/entities.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>Ruby object representing a Mastodon <code>Account</code> object:</p>
108
+ <ul><li>
109
+ <p>id (String)</p>
110
+ </li><li>
111
+ <p>username (String)</p>
112
+ </li><li>
113
+ <p>acct (String)</p>
114
+ </li><li>
115
+ <p>display_name (String)</p>
116
+ </li><li>
117
+ <p>locked (Boolean)</p>
118
+ </li><li>
119
+ <p>bot (Boolean)</p>
120
+ </li><li>
121
+ <p>created_at (Time)</p>
122
+ </li><li>
123
+ <p>followers_count (Integer)</p>
124
+ </li><li>
125
+ <p>following_count (Integer)</p>
126
+ </li><li>
127
+ <p>statuses_count (Integer)</p>
128
+ </li><li>
129
+ <p>note (String)</p>
130
+ </li><li>
131
+ <p>url (URI)</p>
132
+ </li><li>
133
+ <p>avatar (URI)</p>
134
+ </li><li>
135
+ <p>avatar_static (URI)</p>
136
+ </li><li>
137
+ <p>header (URI)</p>
138
+ </li><li>
139
+ <p>header_static (URI)</p>
140
+ </li></ul>
141
+
142
+ <p>See <code>Shep::Entity</code> for an overview.</p>
143
+
144
+
145
+ </div>
146
+ </div>
147
+ <div class="tags">
148
+
149
+
150
+ <p class="tag_title">See Also:</p>
151
+ <ul class="see">
152
+
153
+ <li><a href="https://docs.joinmastodon.org/entities/Account/" target="_parent" title="https://docs.joinmastodon.org/entities/Account/">https://docs.joinmastodon.org/entities/Account/</a></li>
154
+
155
+ </ul>
156
+
157
+ </div>
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+ <h2>Method Summary</h2>
172
+
173
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Entity.html" title="Shep::Entity (class)">Shep::Entity</a></span></h3>
174
+ <p class="inherited"><span class='object_link'><a href="../Entity.html#==-instance_method" title="Shep::Entity#== (method)">#==</a></span>, <span class='object_link'><a href="../Entity.html#[]-instance_method" title="Shep::Entity#[] (method)">#[]</a></span>, <span class='object_link'><a href="../Entity.html#[]=-instance_method" title="Shep::Entity#[]= (method)">#[]=</a></span>, <span class='object_link'><a href="../Entity.html#fields-class_method" title="Shep::Entity.fields (method)">fields</a></span>, <span class='object_link'><a href="../Entity.html#from-class_method" title="Shep::Entity.from (method)">from</a></span>, <span class='object_link'><a href="../Entity.html#initialize-instance_method" title="Shep::Entity#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../Entity.html#print-instance_method" title="Shep::Entity#print (method)">#print</a></span>, <span class='object_link'><a href="../Entity.html#set_from_hash!-instance_method" title="Shep::Entity#set_from_hash! (method)">#set_from_hash!</a></span>, <span class='object_link'><a href="../Entity.html#to_h-instance_method" title="Shep::Entity#to_h (method)">#to_h</a></span>, <span class='object_link'><a href="../Entity.html#to_long_s-instance_method" title="Shep::Entity#to_long_s (method)">#to_long_s</a></span>, <span class='object_link'><a href="../Entity.html#to_s-instance_method" title="Shep::Entity#to_s (method)">#to_s</a></span>, <span class='object_link'><a href="../Entity.html#with-class_method" title="Shep::Entity.with (method)">with</a></span></p>
175
+ <div id="constructor_details" class="method_details_list">
176
+ <h2>Constructor Details</h2>
177
+
178
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="../Entity.html#initialize-instance_method" title="Shep::Entity#initialize (method)">Shep::Entity</a></span></p>
179
+
180
+ </div>
181
+
182
+
183
+ </div>
184
+
185
+ <div id="footer">
186
+ Generated on Sun Jun 4 13:40:32 2023 by
187
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
188
+ 0.9.34 (ruby-3.1.0).
189
+ </div>
190
+
191
+ </div>
192
+ </body>
193
+ </html>
@@ -0,0 +1,165 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Shep::Entity::Context
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Shep::Entity::Context";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (C)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Shep.html" title="Shep (module)">Shep</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Entity.html" title="Shep::Entity (class)">Entity</a></span></span>
41
+ &raquo;
42
+ <span class="title">Context</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Shep::Entity::Context
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="../Entity.html" title="Shep::Entity (class)">Shep::Entity</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="../Entity.html" title="Shep::Entity (class)">Shep::Entity</a></span></li>
78
+
79
+ <li class="next">Shep::Entity::Context</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/shep/entities.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>Ruby object representing a Mastodon <code>Context</code> object:</p>
108
+ <ul><li>
109
+ <p>ancestors (Array&lt;Entity::Status&gt;)</p>
110
+ </li><li>
111
+ <p>descendants (Array&lt;Entity::Status&gt;)</p>
112
+ </li></ul>
113
+
114
+ <p>See <code>Shep::Entity</code> for an overview.</p>
115
+
116
+
117
+ </div>
118
+ </div>
119
+ <div class="tags">
120
+
121
+
122
+ <p class="tag_title">See Also:</p>
123
+ <ul class="see">
124
+
125
+ <li><a href="https://docs.joinmastodon.org/entities/Context/" target="_parent" title="https://docs.joinmastodon.org/entities/Context/">https://docs.joinmastodon.org/entities/Context/</a></li>
126
+
127
+ </ul>
128
+
129
+ </div>
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+ <h2>Method Summary</h2>
144
+
145
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Entity.html" title="Shep::Entity (class)">Shep::Entity</a></span></h3>
146
+ <p class="inherited"><span class='object_link'><a href="../Entity.html#==-instance_method" title="Shep::Entity#== (method)">#==</a></span>, <span class='object_link'><a href="../Entity.html#[]-instance_method" title="Shep::Entity#[] (method)">#[]</a></span>, <span class='object_link'><a href="../Entity.html#[]=-instance_method" title="Shep::Entity#[]= (method)">#[]=</a></span>, <span class='object_link'><a href="../Entity.html#fields-class_method" title="Shep::Entity.fields (method)">fields</a></span>, <span class='object_link'><a href="../Entity.html#from-class_method" title="Shep::Entity.from (method)">from</a></span>, <span class='object_link'><a href="../Entity.html#initialize-instance_method" title="Shep::Entity#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../Entity.html#print-instance_method" title="Shep::Entity#print (method)">#print</a></span>, <span class='object_link'><a href="../Entity.html#set_from_hash!-instance_method" title="Shep::Entity#set_from_hash! (method)">#set_from_hash!</a></span>, <span class='object_link'><a href="../Entity.html#to_h-instance_method" title="Shep::Entity#to_h (method)">#to_h</a></span>, <span class='object_link'><a href="../Entity.html#to_long_s-instance_method" title="Shep::Entity#to_long_s (method)">#to_long_s</a></span>, <span class='object_link'><a href="../Entity.html#to_s-instance_method" title="Shep::Entity#to_s (method)">#to_s</a></span>, <span class='object_link'><a href="../Entity.html#with-class_method" title="Shep::Entity.with (method)">with</a></span></p>
147
+ <div id="constructor_details" class="method_details_list">
148
+ <h2>Constructor Details</h2>
149
+
150
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="../Entity.html#initialize-instance_method" title="Shep::Entity#initialize (method)">Shep::Entity</a></span></p>
151
+
152
+ </div>
153
+
154
+
155
+ </div>
156
+
157
+ <div id="footer">
158
+ Generated on Sun Jun 4 13:40:32 2023 by
159
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
160
+ 0.9.34 (ruby-3.1.0).
161
+ </div>
162
+
163
+ </div>
164
+ </body>
165
+ </html>
@@ -0,0 +1,171 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>
7
+ Class: Shep::Entity::CustomEmoji
8
+
9
+ &mdash; Documentation by YARD 0.9.34
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
+
17
+ <script type="text/javascript">
18
+ pathId = "Shep::Entity::CustomEmoji";
19
+ relpath = '../../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../../_index.html">Index (C)</a> &raquo;
40
+ <span class='title'><span class='object_link'><a href="../../Shep.html" title="Shep (module)">Shep</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Entity.html" title="Shep::Entity (class)">Entity</a></span></span>
41
+ &raquo;
42
+ <span class="title">CustomEmoji</span>
43
+
44
+ </div>
45
+
46
+ <div id="search">
47
+
48
+ <a class="full_list_link" id="class_list_link"
49
+ href="../../class_list.html">
50
+
51
+ <svg width="24" height="24">
52
+ <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
+ <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
+ <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
+ </svg>
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <div id="content"><h1>Class: Shep::Entity::CustomEmoji
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="../Entity.html" title="Shep::Entity (class)">Shep::Entity</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="../Entity.html" title="Shep::Entity (class)">Shep::Entity</a></span></li>
78
+
79
+ <li class="next">Shep::Entity::CustomEmoji</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+ <dl>
98
+ <dt>Defined in:</dt>
99
+ <dd>lib/shep/entities.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+ <h2>Overview</h2><div class="docstring">
105
+ <div class="discussion">
106
+
107
+ <p>Ruby object representing a Mastodon <code>CustomEmoji</code> object:</p>
108
+ <ul><li>
109
+ <p>shortcode (String)</p>
110
+ </li><li>
111
+ <p>url (URI)</p>
112
+ </li><li>
113
+ <p>static_url (URI)</p>
114
+ </li><li>
115
+ <p>visible_in_picker (Boolean)</p>
116
+ </li><li>
117
+ <p>category (String)</p>
118
+ </li></ul>
119
+
120
+ <p>See <code>Shep::Entity</code> for an overview.</p>
121
+
122
+
123
+ </div>
124
+ </div>
125
+ <div class="tags">
126
+
127
+
128
+ <p class="tag_title">See Also:</p>
129
+ <ul class="see">
130
+
131
+ <li><a href="https://docs.joinmastodon.org/entities/CustomEmoji/" target="_parent" title="https://docs.joinmastodon.org/entities/CustomEmoji/">https://docs.joinmastodon.org/entities/CustomEmoji/</a></li>
132
+
133
+ </ul>
134
+
135
+ </div>
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ <h2>Method Summary</h2>
150
+
151
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="../Entity.html" title="Shep::Entity (class)">Shep::Entity</a></span></h3>
152
+ <p class="inherited"><span class='object_link'><a href="../Entity.html#==-instance_method" title="Shep::Entity#== (method)">#==</a></span>, <span class='object_link'><a href="../Entity.html#[]-instance_method" title="Shep::Entity#[] (method)">#[]</a></span>, <span class='object_link'><a href="../Entity.html#[]=-instance_method" title="Shep::Entity#[]= (method)">#[]=</a></span>, <span class='object_link'><a href="../Entity.html#fields-class_method" title="Shep::Entity.fields (method)">fields</a></span>, <span class='object_link'><a href="../Entity.html#from-class_method" title="Shep::Entity.from (method)">from</a></span>, <span class='object_link'><a href="../Entity.html#initialize-instance_method" title="Shep::Entity#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="../Entity.html#print-instance_method" title="Shep::Entity#print (method)">#print</a></span>, <span class='object_link'><a href="../Entity.html#set_from_hash!-instance_method" title="Shep::Entity#set_from_hash! (method)">#set_from_hash!</a></span>, <span class='object_link'><a href="../Entity.html#to_h-instance_method" title="Shep::Entity#to_h (method)">#to_h</a></span>, <span class='object_link'><a href="../Entity.html#to_long_s-instance_method" title="Shep::Entity#to_long_s (method)">#to_long_s</a></span>, <span class='object_link'><a href="../Entity.html#to_s-instance_method" title="Shep::Entity#to_s (method)">#to_s</a></span>, <span class='object_link'><a href="../Entity.html#with-class_method" title="Shep::Entity.with (method)">with</a></span></p>
153
+ <div id="constructor_details" class="method_details_list">
154
+ <h2>Constructor Details</h2>
155
+
156
+ <p class="notice">This class inherits a constructor from <span class='object_link'><a href="../Entity.html#initialize-instance_method" title="Shep::Entity#initialize (method)">Shep::Entity</a></span></p>
157
+
158
+ </div>
159
+
160
+
161
+ </div>
162
+
163
+ <div id="footer">
164
+ Generated on Sun Jun 4 13:40:31 2023 by
165
+ <a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
166
+ 0.9.34 (ruby-3.1.0).
167
+ </div>
168
+
169
+ </div>
170
+ </body>
171
+ </html>