Class: TentValidator::WithoutAuthentication::AppValidator
- Inherits:
-
PostValidator
- Object
- ApiValidator::Spec
- Spec
- PostValidator
- TentValidator::WithoutAuthentication::AppValidator
show all
- Defined in:
- lib/tent-validator/validators/without_authentication/app_validator.rb
Instance Method Summary
collapse
Methods inherited from Spec
#clients, #generate_version_signature, #hex_digest, #invalid_value, #valid_value
Instance Method Details
#generate_app_icon_attachment ⇒ Object
27
28
29
30
31
32
33
34
|
# File 'lib/tent-validator/validators/without_authentication/app_validator.rb', line 27
def generate_app_icon_attachment
{
:content_type => "image/png",
:category => 'icon',
:name => 'appicon.png',
:data => "Fake image data"
}
end
|
#generate_app_post ⇒ Object
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
# File 'lib/tent-validator/validators/without_authentication/app_validator.rb', line 7
def generate_app_post
{
:type => "https://tent.io/types/app/v0#",
:content => {
:name => "Example App Name",
:description => "Example App Description",
:url => "http://someapp.example.com",
:redirect_uri => "http://someapp.example.com/oauth/callback",
:post_types => {
:read => %w( https://tent.io/types/status/v0# ),
:write => %w( https://tent.io/types/status/v0# )
},
:scopes => %w( import_posts )
},
:permissions => {
:public => false
}
}
end
|