myask 0.0.1 → 1.1.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/Gemfile.lock +1 -1
- data/bin/myask +1 -1
- data/html/App.html +116 -0
- data/html/MyAsk/Api/Helper.html +207 -0
- data/html/MyAsk/Api/Invitation.html +212 -0
- data/html/MyAsk/Api/Project.html +355 -0
- data/html/MyAsk/Api/ProjectHelper.html +299 -0
- data/html/MyAsk/Api/Question.html +261 -0
- data/html/MyAsk/Api.html +120 -0
- data/html/MyAsk/Config.html +195 -0
- data/html/MyAsk/ConfigHelper.html +251 -0
- data/html/MyAsk/Prompt.html +221 -0
- data/html/MyAsk/PromptHelper.html +330 -0
- data/html/MyAsk.html +114 -0
- data/html/README_rdoc.html +394 -0
- data/html/created.rid +14 -0
- data/html/css/fonts.css +167 -0
- data/html/css/rdoc.css +681 -0
- data/html/fonts/Lato-Light.ttf +0 -0
- data/html/fonts/Lato-LightItalic.ttf +0 -0
- data/html/fonts/Lato-Regular.ttf +0 -0
- data/html/fonts/Lato-RegularItalic.ttf +0 -0
- data/html/fonts/SourceCodePro-Bold.ttf +0 -0
- data/html/fonts/SourceCodePro-Regular.ttf +0 -0
- data/html/images/add.png +0 -0
- data/html/images/arrow_up.png +0 -0
- data/html/images/brick.png +0 -0
- data/html/images/brick_link.png +0 -0
- data/html/images/bug.png +0 -0
- data/html/images/bullet_black.png +0 -0
- data/html/images/bullet_toggle_minus.png +0 -0
- data/html/images/bullet_toggle_plus.png +0 -0
- data/html/images/date.png +0 -0
- data/html/images/delete.png +0 -0
- data/html/images/find.png +0 -0
- data/html/images/loadingAnimation.gif +0 -0
- data/html/images/macFFBgHack.png +0 -0
- data/html/images/package.png +0 -0
- data/html/images/page_green.png +0 -0
- data/html/images/page_white_text.png +0 -0
- data/html/images/page_white_width.png +0 -0
- data/html/images/plugin.png +0 -0
- data/html/images/ruby.png +0 -0
- data/html/images/tag_blue.png +0 -0
- data/html/images/tag_green.png +0 -0
- data/html/images/transparent.png +0 -0
- data/html/images/wrench.png +0 -0
- data/html/images/wrench_orange.png +0 -0
- data/html/images/zoom.png +0 -0
- data/html/index.html +403 -0
- data/html/js/darkfish.js +120 -0
- data/html/js/navigation.js +105 -0
- data/html/js/navigation.js.gz +0 -0
- data/html/js/search.js +110 -0
- data/html/js/search_index.js +1 -0
- data/html/js/search_index.js.gz +0 -0
- data/html/js/searcher.js +229 -0
- data/html/js/searcher.js.gz +0 -0
- data/html/table_of_contents.html +257 -0
- data/lib/myask/prompt_helper.rb +4 -1
- data/lib/myask/version.rb +1 -1
- data/pkg/myask-0.0.1/Gemfile +10 -0
- data/pkg/myask-0.0.1/Gemfile.lock +70 -0
- data/pkg/myask-0.0.1/README.rdoc +6 -0
- data/pkg/myask-0.0.1/Rakefile +21 -0
- data/pkg/myask-0.0.1/bin/myask +101 -0
- data/pkg/myask-0.0.1/lib/myask/api/api_helper.rb +45 -0
- data/pkg/myask-0.0.1/lib/myask/api/invitation.rb +49 -0
- data/pkg/myask-0.0.1/lib/myask/api/project.rb +193 -0
- data/pkg/myask-0.0.1/lib/myask/api/project_helper.rb +46 -0
- data/pkg/myask-0.0.1/lib/myask/api/question.rb +99 -0
- data/pkg/myask-0.0.1/lib/myask/config.rb +37 -0
- data/pkg/myask-0.0.1/lib/myask/config_helper.rb +28 -0
- data/pkg/myask-0.0.1/lib/myask/prompt.rb +63 -0
- data/pkg/myask-0.0.1/lib/myask/prompt_helper.rb +83 -0
- data/pkg/myask-0.0.1/lib/myask/version.rb +3 -0
- data/pkg/myask-0.0.1/lib/myask.rb +28 -0
- data/pkg/myask-0.0.1/myask.gemspec +22 -0
- data/pkg/myask-0.0.1/myask.rdoc +138 -0
- data/pkg/myask-0.0.1/test/default_test.rb +14 -0
- data/pkg/myask-0.0.1/test/test_helper.rb +4 -0
- data/pkg/myask-0.0.1.gem +0 -0
- data/pkg/myask-1.0.0/Gemfile +10 -0
- data/pkg/myask-1.0.0/Gemfile.lock +70 -0
- data/pkg/myask-1.0.0/README.rdoc +6 -0
- data/pkg/myask-1.0.0/Rakefile +21 -0
- data/pkg/myask-1.0.0/bin/myask +101 -0
- data/pkg/myask-1.0.0/html/App.html +116 -0
- data/pkg/myask-1.0.0/html/MyAsk/Api/Helper.html +207 -0
- data/pkg/myask-1.0.0/html/MyAsk/Api/Invitation.html +212 -0
- data/pkg/myask-1.0.0/html/MyAsk/Api/Project.html +355 -0
- data/pkg/myask-1.0.0/html/MyAsk/Api/ProjectHelper.html +299 -0
- data/pkg/myask-1.0.0/html/MyAsk/Api/Question.html +261 -0
- data/pkg/myask-1.0.0/html/MyAsk/Api.html +120 -0
- data/pkg/myask-1.0.0/html/MyAsk/Config.html +195 -0
- data/pkg/myask-1.0.0/html/MyAsk/ConfigHelper.html +251 -0
- data/pkg/myask-1.0.0/html/MyAsk/Prompt.html +221 -0
- data/pkg/myask-1.0.0/html/MyAsk/PromptHelper.html +330 -0
- data/pkg/myask-1.0.0/html/MyAsk.html +114 -0
- data/pkg/myask-1.0.0/html/README_rdoc.html +394 -0
- data/pkg/myask-1.0.0/html/created.rid +14 -0
- data/pkg/myask-1.0.0/html/css/fonts.css +167 -0
- data/pkg/myask-1.0.0/html/css/rdoc.css +681 -0
- data/pkg/myask-1.0.0/html/fonts/Lato-Light.ttf +0 -0
- data/pkg/myask-1.0.0/html/fonts/Lato-LightItalic.ttf +0 -0
- data/pkg/myask-1.0.0/html/fonts/Lato-Regular.ttf +0 -0
- data/pkg/myask-1.0.0/html/fonts/Lato-RegularItalic.ttf +0 -0
- data/pkg/myask-1.0.0/html/fonts/SourceCodePro-Bold.ttf +0 -0
- data/pkg/myask-1.0.0/html/fonts/SourceCodePro-Regular.ttf +0 -0
- data/pkg/myask-1.0.0/html/images/add.png +0 -0
- data/pkg/myask-1.0.0/html/images/arrow_up.png +0 -0
- data/pkg/myask-1.0.0/html/images/brick.png +0 -0
- data/pkg/myask-1.0.0/html/images/brick_link.png +0 -0
- data/pkg/myask-1.0.0/html/images/bug.png +0 -0
- data/pkg/myask-1.0.0/html/images/bullet_black.png +0 -0
- data/pkg/myask-1.0.0/html/images/bullet_toggle_minus.png +0 -0
- data/pkg/myask-1.0.0/html/images/bullet_toggle_plus.png +0 -0
- data/pkg/myask-1.0.0/html/images/date.png +0 -0
- data/pkg/myask-1.0.0/html/images/delete.png +0 -0
- data/pkg/myask-1.0.0/html/images/find.png +0 -0
- data/pkg/myask-1.0.0/html/images/loadingAnimation.gif +0 -0
- data/pkg/myask-1.0.0/html/images/macFFBgHack.png +0 -0
- data/pkg/myask-1.0.0/html/images/package.png +0 -0
- data/pkg/myask-1.0.0/html/images/page_green.png +0 -0
- data/pkg/myask-1.0.0/html/images/page_white_text.png +0 -0
- data/pkg/myask-1.0.0/html/images/page_white_width.png +0 -0
- data/pkg/myask-1.0.0/html/images/plugin.png +0 -0
- data/pkg/myask-1.0.0/html/images/ruby.png +0 -0
- data/pkg/myask-1.0.0/html/images/tag_blue.png +0 -0
- data/pkg/myask-1.0.0/html/images/tag_green.png +0 -0
- data/pkg/myask-1.0.0/html/images/transparent.png +0 -0
- data/pkg/myask-1.0.0/html/images/wrench.png +0 -0
- data/pkg/myask-1.0.0/html/images/wrench_orange.png +0 -0
- data/pkg/myask-1.0.0/html/images/zoom.png +0 -0
- data/pkg/myask-1.0.0/html/index.html +403 -0
- data/pkg/myask-1.0.0/html/js/darkfish.js +120 -0
- data/pkg/myask-1.0.0/html/js/navigation.js +105 -0
- data/pkg/myask-1.0.0/html/js/navigation.js.gz +0 -0
- data/pkg/myask-1.0.0/html/js/search.js +110 -0
- data/pkg/myask-1.0.0/html/js/search_index.js +1 -0
- data/pkg/myask-1.0.0/html/js/search_index.js.gz +0 -0
- data/pkg/myask-1.0.0/html/js/searcher.js +229 -0
- data/pkg/myask-1.0.0/html/js/searcher.js.gz +0 -0
- data/pkg/myask-1.0.0/html/table_of_contents.html +257 -0
- data/pkg/myask-1.0.0/lib/myask/api/api_helper.rb +45 -0
- data/pkg/myask-1.0.0/lib/myask/api/invitation.rb +49 -0
- data/pkg/myask-1.0.0/lib/myask/api/project.rb +193 -0
- data/pkg/myask-1.0.0/lib/myask/api/project_helper.rb +46 -0
- data/pkg/myask-1.0.0/lib/myask/api/question.rb +99 -0
- data/pkg/myask-1.0.0/lib/myask/config.rb +37 -0
- data/pkg/myask-1.0.0/lib/myask/config_helper.rb +28 -0
- data/pkg/myask-1.0.0/lib/myask/prompt.rb +63 -0
- data/pkg/myask-1.0.0/lib/myask/prompt_helper.rb +83 -0
- data/pkg/myask-1.0.0/lib/myask/version.rb +3 -0
- data/pkg/myask-1.0.0/lib/myask.rb +28 -0
- data/pkg/myask-1.0.0/myask.gemspec +22 -0
- data/pkg/myask-1.0.0/myask.rdoc +138 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/Gemfile +10 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/Gemfile.lock +70 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/README.rdoc +6 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/Rakefile +21 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/bin/myask +101 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/api/api_helper.rb +45 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/api/invitation.rb +49 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/api/project.rb +193 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/api/project_helper.rb +46 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/api/question.rb +99 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/config.rb +37 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/config_helper.rb +28 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/prompt.rb +63 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/prompt_helper.rb +83 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask/version.rb +3 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/lib/myask.rb +28 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/myask.gemspec +22 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/myask.rdoc +138 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/test/default_test.rb +14 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1/test/test_helper.rb +4 -0
- data/pkg/myask-1.0.0/pkg/myask-0.0.1.gem +0 -0
- data/pkg/myask-1.0.0/test/default_test.rb +14 -0
- data/pkg/myask-1.0.0/test/test_helper.rb +4 -0
- data/pkg/myask-1.0.0.gem +0 -0
- metadata +179 -2
@@ -0,0 +1,116 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
7
|
+
|
8
|
+
<title>class App - Your application title</title>
|
9
|
+
|
10
|
+
<meta name="keywords" content="ruby,class,App">
|
11
|
+
|
12
|
+
<meta name="description" content="Documentation for the App class">
|
13
|
+
|
14
|
+
<script type="text/javascript">
|
15
|
+
var rdoc_rel_prefix = "./";
|
16
|
+
var index_rel_prefix = "./";
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<script src="./js/navigation.js" defer></script>
|
20
|
+
<script src="./js/search.js" defer></script>
|
21
|
+
<script src="./js/search_index.js" defer></script>
|
22
|
+
<script src="./js/searcher.js" defer></script>
|
23
|
+
<script src="./js/darkfish.js" defer></script>
|
24
|
+
|
25
|
+
<link href="./css/fonts.css" rel="stylesheet">
|
26
|
+
<link href="./css/rdoc.css" rel="stylesheet">
|
27
|
+
|
28
|
+
|
29
|
+
<body id="top" role="document" class="class">
|
30
|
+
<div id="navigation-toggle" role="button" tabindex="0" aria-label="Toggle sidebar" aria-expanded="true" aria-controls="navigation">
|
31
|
+
<span aria-hidden="true">☰</span>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
|
35
|
+
<nav id="navigation" role="navigation">
|
36
|
+
<div id="project-navigation">
|
37
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
38
|
+
<h2>
|
39
|
+
<a href="./index.html" rel="home">Home</a>
|
40
|
+
</h2>
|
41
|
+
|
42
|
+
<div id="table-of-contents-navigation">
|
43
|
+
<a href="./table_of_contents.html#pages">Pages</a>
|
44
|
+
<a href="./table_of_contents.html#classes">Classes</a>
|
45
|
+
<a href="./table_of_contents.html#methods">Methods</a>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
50
|
+
<form action="#" method="get" accept-charset="utf-8">
|
51
|
+
<div id="search-field-wrapper">
|
52
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
53
|
+
aria-autocomplete="list" aria-controls="search-results"
|
54
|
+
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
55
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<ul id="search-results" aria-label="Search Results"
|
59
|
+
aria-busy="false" aria-expanded="false"
|
60
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
61
|
+
</form>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
</div>
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
<div id="parent-class-section" class="nav-section">
|
69
|
+
<h3>Ancestors</h3>
|
70
|
+
<ul><li>Object</li></ul>
|
71
|
+
</div>
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
<div id="extends-section" class="nav-section">
|
76
|
+
<h3>Extended With Modules</h3>
|
77
|
+
|
78
|
+
<ul class="link-list">
|
79
|
+
<li><span class="extend">GLI::App</span>
|
80
|
+
</ul>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
<footer id="validator-badges" role="contentinfo">
|
89
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
90
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.13.0.
|
91
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
92
|
+
</footer>
|
93
|
+
|
94
|
+
</nav>
|
95
|
+
|
96
|
+
<main role="main" aria-labelledby="class-App">
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<h1 id="class-App" class="anchor-link class">
|
101
|
+
class App
|
102
|
+
</h1>
|
103
|
+
|
104
|
+
<section class="description">
|
105
|
+
|
106
|
+
</section>
|
107
|
+
|
108
|
+
<section id="5Buntitled-5D" class="documentation-section anchor-link">
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
</section>
|
115
|
+
</main>
|
116
|
+
|
@@ -0,0 +1,207 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
7
|
+
|
8
|
+
<title>class MyAsk::Api::Helper - Your application title</title>
|
9
|
+
|
10
|
+
<meta name="keywords" content="ruby,class,MyAsk::Api::Helper">
|
11
|
+
|
12
|
+
<meta name="description" content="Documentation for the MyAsk::Api::Helper class">
|
13
|
+
|
14
|
+
<script type="text/javascript">
|
15
|
+
var rdoc_rel_prefix = "../../";
|
16
|
+
var index_rel_prefix = "../../";
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<script src="../../js/navigation.js" defer></script>
|
20
|
+
<script src="../../js/search.js" defer></script>
|
21
|
+
<script src="../../js/search_index.js" defer></script>
|
22
|
+
<script src="../../js/searcher.js" defer></script>
|
23
|
+
<script src="../../js/darkfish.js" defer></script>
|
24
|
+
|
25
|
+
<link href="../../css/fonts.css" rel="stylesheet">
|
26
|
+
<link href="../../css/rdoc.css" rel="stylesheet">
|
27
|
+
|
28
|
+
|
29
|
+
<body id="top" role="document" class="class">
|
30
|
+
<div id="navigation-toggle" role="button" tabindex="0" aria-label="Toggle sidebar" aria-expanded="true" aria-controls="navigation">
|
31
|
+
<span aria-hidden="true">☰</span>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
|
35
|
+
<nav id="navigation" role="navigation">
|
36
|
+
<div id="project-navigation">
|
37
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
38
|
+
<h2>
|
39
|
+
<a href="../../index.html" rel="home">Home</a>
|
40
|
+
</h2>
|
41
|
+
|
42
|
+
<div id="table-of-contents-navigation">
|
43
|
+
<a href="../../table_of_contents.html#pages">Pages</a>
|
44
|
+
<a href="../../table_of_contents.html#classes">Classes</a>
|
45
|
+
<a href="../../table_of_contents.html#methods">Methods</a>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
50
|
+
<form action="#" method="get" accept-charset="utf-8">
|
51
|
+
<div id="search-field-wrapper">
|
52
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
53
|
+
aria-autocomplete="list" aria-controls="search-results"
|
54
|
+
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
55
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<ul id="search-results" aria-label="Search Results"
|
59
|
+
aria-busy="false" aria-expanded="false"
|
60
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
61
|
+
</form>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
</div>
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
<div id="parent-class-section" class="nav-section">
|
69
|
+
<h3>Ancestors</h3>
|
70
|
+
<ul><li>Object</li></ul>
|
71
|
+
</div>
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
<div class="nav-section">
|
77
|
+
<h3>Class Methods</h3>
|
78
|
+
<ul class="link-list" role="directory">
|
79
|
+
<li ><a href="#method-c-make_request">make_request</a></li>
|
80
|
+
</ul>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
<footer id="validator-badges" role="contentinfo">
|
88
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
89
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.13.0.
|
90
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
91
|
+
</footer>
|
92
|
+
|
93
|
+
</nav>
|
94
|
+
|
95
|
+
<main role="main" aria-labelledby="class-MyAsk::Api::Helper">
|
96
|
+
|
97
|
+
|
98
|
+
<ol role="navigation" aria-label="breadcrumb" class="breadcrumb">
|
99
|
+
|
100
|
+
<li>
|
101
|
+
|
102
|
+
<a href="../../MyAsk.html">MyAsk</a><span>::</span>
|
103
|
+
|
104
|
+
</li>
|
105
|
+
|
106
|
+
<li>
|
107
|
+
|
108
|
+
<a href="../../MyAsk/Api.html">Api</a><span>::</span>
|
109
|
+
|
110
|
+
</li>
|
111
|
+
|
112
|
+
<li>
|
113
|
+
|
114
|
+
<span>Helper</span>
|
115
|
+
|
116
|
+
</li>
|
117
|
+
|
118
|
+
</ol>
|
119
|
+
|
120
|
+
|
121
|
+
<h1 id="class-MyAsk::Api::Helper" class="anchor-link class">
|
122
|
+
class MyAsk::Api::Helper
|
123
|
+
</h1>
|
124
|
+
|
125
|
+
<section class="description">
|
126
|
+
|
127
|
+
</section>
|
128
|
+
|
129
|
+
<section id="5Buntitled-5D" class="documentation-section anchor-link">
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section anchor-link">
|
136
|
+
<header>
|
137
|
+
<h3>Public Class Methods</h3>
|
138
|
+
</header>
|
139
|
+
|
140
|
+
<div id="method-c-make_request" class="method-detail anchor-link ">
|
141
|
+
<div class="method-header">
|
142
|
+
<div class="method-heading">
|
143
|
+
<a href="#method-c-make_request" title="Link to this method">
|
144
|
+
<span class="method-name">make_request</span>
|
145
|
+
<span class="method-args">(method, uri, api_key, payload = nil)</span>
|
146
|
+
</a>
|
147
|
+
</div>
|
148
|
+
</div>
|
149
|
+
|
150
|
+
<div class="method-controls">
|
151
|
+
<details class="method-source-toggle">
|
152
|
+
<summary>Source</summary>
|
153
|
+
</details>
|
154
|
+
</div>
|
155
|
+
|
156
|
+
<div class="method-description">
|
157
|
+
<div class="method-source-code" id="make_request-source">
|
158
|
+
<pre><span class="ruby-comment"># File lib/myask/api/api_helper.rb, line 5</span>
|
159
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">make_request</span>(<span class="ruby-identifier">method</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">api_key</span>, <span class="ruby-identifier">payload</span> = <span class="ruby-keyword">nil</span>)
|
160
|
+
<span class="ruby-identifier">http</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">host</span>, <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">port</span>)
|
161
|
+
<span class="ruby-identifier">http</span>.<span class="ruby-identifier">use_ssl</span> = <span class="ruby-keyword">true</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">scheme</span> <span class="ruby-operator">==</span> <span class="ruby-string">'https'</span>
|
162
|
+
|
163
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">method</span> <span class="ruby-operator">==</span> <span class="ruby-string">"Get"</span>
|
164
|
+
<span class="ruby-identifier">request</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span><span class="ruby-operator">::</span><span class="ruby-constant">Get</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">request_uri</span>)
|
165
|
+
<span class="ruby-identifier">request</span>[<span class="ruby-string">'Authorization'</span>] = <span class="ruby-node">"Bearer #{api_key}"</span>
|
166
|
+
<span class="ruby-identifier">request</span>[<span class="ruby-string">"Content-Type"</span>] = <span class="ruby-string">"application/json"</span>
|
167
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-identifier">http</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">request</span>)
|
168
|
+
<span class="ruby-keyword">elsif</span> <span class="ruby-identifier">method</span> <span class="ruby-operator">==</span> <span class="ruby-string">"Delete"</span>
|
169
|
+
<span class="ruby-identifier">request</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span><span class="ruby-operator">::</span><span class="ruby-constant">Delete</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">request_uri</span>)
|
170
|
+
<span class="ruby-identifier">request</span>[<span class="ruby-string">'Authorization'</span>] = <span class="ruby-node">"Bearer #{api_key}"</span>
|
171
|
+
<span class="ruby-identifier">request</span>[<span class="ruby-string">"Content-Type"</span>] = <span class="ruby-string">"application/json"</span>
|
172
|
+
<span class="ruby-identifier">request</span>.<span class="ruby-identifier">body</span> = <span class="ruby-identifier">payload</span>.<span class="ruby-identifier">to_json</span>
|
173
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">start</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">hostname</span>, <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">port</span>, <span class="ruby-value">use_ssl:</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">scheme</span> <span class="ruby-operator">==</span> <span class="ruby-string">'https'</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">http</span><span class="ruby-operator">|</span>
|
174
|
+
<span class="ruby-identifier">http</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">request</span>)
|
175
|
+
<span class="ruby-keyword">end</span>
|
176
|
+
<span class="ruby-keyword">elsif</span> <span class="ruby-identifier">method</span> <span class="ruby-operator">==</span> <span class="ruby-string">"Patch"</span>
|
177
|
+
<span class="ruby-identifier">request</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span><span class="ruby-operator">::</span><span class="ruby-constant">Patch</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">request_uri</span>)
|
178
|
+
<span class="ruby-identifier">request</span>[<span class="ruby-string">'Authorization'</span>] = <span class="ruby-node">"Bearer #{api_key}"</span>
|
179
|
+
<span class="ruby-identifier">request</span>[<span class="ruby-string">"Content-Type"</span>] = <span class="ruby-string">"application/json"</span>
|
180
|
+
<span class="ruby-identifier">request</span>.<span class="ruby-identifier">body</span> = <span class="ruby-identifier">payload</span>.<span class="ruby-identifier">to_json</span>
|
181
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">start</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">hostname</span>, <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">port</span>, <span class="ruby-value">use_ssl:</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">scheme</span> <span class="ruby-operator">==</span> <span class="ruby-string">'https'</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">http</span><span class="ruby-operator">|</span>
|
182
|
+
<span class="ruby-identifier">http</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">request</span>)
|
183
|
+
<span class="ruby-keyword">end</span>
|
184
|
+
<span class="ruby-keyword">else</span>
|
185
|
+
<span class="ruby-identifier">request</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span><span class="ruby-operator">::</span><span class="ruby-constant">Post</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">request_uri</span>)
|
186
|
+
<span class="ruby-identifier">request</span>[<span class="ruby-string">'Authorization'</span>] = <span class="ruby-node">"Bearer #{api_key}"</span>
|
187
|
+
<span class="ruby-identifier">request</span>[<span class="ruby-string">"Content-Type"</span>] = <span class="ruby-string">"application/json"</span>
|
188
|
+
<span class="ruby-identifier">request</span>.<span class="ruby-identifier">body</span> = <span class="ruby-identifier">payload</span>.<span class="ruby-identifier">to_json</span>
|
189
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-constant">Net</span><span class="ruby-operator">::</span><span class="ruby-constant">HTTP</span>.<span class="ruby-identifier">start</span>(<span class="ruby-identifier">uri</span>.<span class="ruby-identifier">hostname</span>, <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">port</span>, <span class="ruby-value">use_ssl:</span> <span class="ruby-identifier">uri</span>.<span class="ruby-identifier">scheme</span> <span class="ruby-operator">==</span> <span class="ruby-string">'https'</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">http</span><span class="ruby-operator">|</span>
|
190
|
+
<span class="ruby-identifier">http</span>.<span class="ruby-identifier">request</span>(<span class="ruby-identifier">request</span>)
|
191
|
+
<span class="ruby-keyword">end</span>
|
192
|
+
<span class="ruby-keyword">end</span>
|
193
|
+
|
194
|
+
<span class="ruby-identifier">response</span>
|
195
|
+
<span class="ruby-keyword">end</span></pre>
|
196
|
+
</div>
|
197
|
+
|
198
|
+
</div>
|
199
|
+
|
200
|
+
|
201
|
+
</div>
|
202
|
+
|
203
|
+
</section>
|
204
|
+
|
205
|
+
</section>
|
206
|
+
</main>
|
207
|
+
|
@@ -0,0 +1,212 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
7
|
+
|
8
|
+
<title>class MyAsk::Api::Invitation - Your application title</title>
|
9
|
+
|
10
|
+
<meta name="keywords" content="ruby,class,MyAsk::Api::Invitation">
|
11
|
+
|
12
|
+
<meta name="description" content="Documentation for the MyAsk::Api::Invitation class">
|
13
|
+
|
14
|
+
<script type="text/javascript">
|
15
|
+
var rdoc_rel_prefix = "../../";
|
16
|
+
var index_rel_prefix = "../../";
|
17
|
+
</script>
|
18
|
+
|
19
|
+
<script src="../../js/navigation.js" defer></script>
|
20
|
+
<script src="../../js/search.js" defer></script>
|
21
|
+
<script src="../../js/search_index.js" defer></script>
|
22
|
+
<script src="../../js/searcher.js" defer></script>
|
23
|
+
<script src="../../js/darkfish.js" defer></script>
|
24
|
+
|
25
|
+
<link href="../../css/fonts.css" rel="stylesheet">
|
26
|
+
<link href="../../css/rdoc.css" rel="stylesheet">
|
27
|
+
|
28
|
+
|
29
|
+
<body id="top" role="document" class="class">
|
30
|
+
<div id="navigation-toggle" role="button" tabindex="0" aria-label="Toggle sidebar" aria-expanded="true" aria-controls="navigation">
|
31
|
+
<span aria-hidden="true">☰</span>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
|
35
|
+
<nav id="navigation" role="navigation">
|
36
|
+
<div id="project-navigation">
|
37
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
38
|
+
<h2>
|
39
|
+
<a href="../../index.html" rel="home">Home</a>
|
40
|
+
</h2>
|
41
|
+
|
42
|
+
<div id="table-of-contents-navigation">
|
43
|
+
<a href="../../table_of_contents.html#pages">Pages</a>
|
44
|
+
<a href="../../table_of_contents.html#classes">Classes</a>
|
45
|
+
<a href="../../table_of_contents.html#methods">Methods</a>
|
46
|
+
</div>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
50
|
+
<form action="#" method="get" accept-charset="utf-8">
|
51
|
+
<div id="search-field-wrapper">
|
52
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
53
|
+
aria-autocomplete="list" aria-controls="search-results"
|
54
|
+
type="text" name="search" placeholder="Search (/) for a class, method, ..." spellcheck="false"
|
55
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<ul id="search-results" aria-label="Search Results"
|
59
|
+
aria-busy="false" aria-expanded="false"
|
60
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
61
|
+
</form>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
</div>
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
<div id="parent-class-section" class="nav-section">
|
69
|
+
<h3>Ancestors</h3>
|
70
|
+
<ul><li>Object</li></ul>
|
71
|
+
</div>
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
<div class="nav-section">
|
77
|
+
<h3>Class Methods</h3>
|
78
|
+
<ul class="link-list" role="directory">
|
79
|
+
<li ><a href="#method-c-new">new</a></li>
|
80
|
+
</ul>
|
81
|
+
</div>
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
<footer id="validator-badges" role="contentinfo">
|
88
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
89
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.13.0.
|
90
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
91
|
+
</footer>
|
92
|
+
|
93
|
+
</nav>
|
94
|
+
|
95
|
+
<main role="main" aria-labelledby="class-MyAsk::Api::Invitation">
|
96
|
+
|
97
|
+
|
98
|
+
<ol role="navigation" aria-label="breadcrumb" class="breadcrumb">
|
99
|
+
|
100
|
+
<li>
|
101
|
+
|
102
|
+
<a href="../../MyAsk.html">MyAsk</a><span>::</span>
|
103
|
+
|
104
|
+
</li>
|
105
|
+
|
106
|
+
<li>
|
107
|
+
|
108
|
+
<a href="../../MyAsk/Api.html">Api</a><span>::</span>
|
109
|
+
|
110
|
+
</li>
|
111
|
+
|
112
|
+
<li>
|
113
|
+
|
114
|
+
<span>Invitation</span>
|
115
|
+
|
116
|
+
</li>
|
117
|
+
|
118
|
+
</ol>
|
119
|
+
|
120
|
+
|
121
|
+
<h1 id="class-MyAsk::Api::Invitation" class="anchor-link class">
|
122
|
+
class MyAsk::Api::Invitation
|
123
|
+
</h1>
|
124
|
+
|
125
|
+
<section class="description">
|
126
|
+
|
127
|
+
</section>
|
128
|
+
|
129
|
+
<section id="5Buntitled-5D" class="documentation-section anchor-link">
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section anchor-link">
|
136
|
+
<header>
|
137
|
+
<h3>Public Class Methods</h3>
|
138
|
+
</header>
|
139
|
+
|
140
|
+
<div id="method-c-new" class="method-detail anchor-link ">
|
141
|
+
<div class="method-header">
|
142
|
+
<div class="method-heading">
|
143
|
+
<a href="#method-c-new" title="Link to this method">
|
144
|
+
<span class="method-name">new</span>
|
145
|
+
<span class="method-args">(c)</span>
|
146
|
+
</a>
|
147
|
+
</div>
|
148
|
+
</div>
|
149
|
+
|
150
|
+
<div class="method-controls">
|
151
|
+
<details class="method-source-toggle">
|
152
|
+
<summary>Source</summary>
|
153
|
+
</details>
|
154
|
+
</div>
|
155
|
+
|
156
|
+
<div class="method-description">
|
157
|
+
<div class="method-source-code" id="new-source">
|
158
|
+
<pre><span class="ruby-comment"># File lib/myask/api/invitation.rb, line 5</span>
|
159
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">c</span>)
|
160
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">desc</span> <span class="ruby-string">'List MyAsk invitations.'</span>
|
161
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">command</span> <span class="ruby-value">:list</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
|
162
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">action</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">global_options</span>, <span class="ruby-identifier">_options</span>, <span class="ruby-identifier">_args</span><span class="ruby-operator">|</span>
|
163
|
+
<span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>(<span class="ruby-node">"#{global_options[:api_host]}/api/invitations"</span>)
|
164
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-constant">MyAsk</span><span class="ruby-operator">::</span><span class="ruby-constant">Api</span><span class="ruby-operator">::</span><span class="ruby-constant">Helper</span>.<span class="ruby-identifier">make_request</span>(<span class="ruby-string">"Get"</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">global_options</span>[<span class="ruby-value">:api_key</span>])
|
165
|
+
|
166
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-string">"Invitation sent successfully:"</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">global_options</span>[<span class="ruby-value">:json</span>]
|
167
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">pretty_generate</span>(<span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>))
|
168
|
+
<span class="ruby-keyword">end</span>
|
169
|
+
<span class="ruby-keyword">end</span>
|
170
|
+
|
171
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">desc</span> <span class="ruby-string">"Send MyAsk invitation to a new user"</span>
|
172
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">command</span> <span class="ruby-value">:send</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">c</span><span class="ruby-operator">|</span>
|
173
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">desc</span> <span class="ruby-string">"Send MyAsk invitation to a new user"</span>
|
174
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">flag</span> [<span class="ruby-value">:email</span>], <span class="ruby-value">desc:</span> <span class="ruby-string">"Email of the user to invite to MyAsk"</span>
|
175
|
+
|
176
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">action</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">global_options</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">args</span><span class="ruby-operator">|</span>
|
177
|
+
<span class="ruby-identifier">email</span> = <span class="ruby-identifier">options</span>[<span class="ruby-value">:email</span>]
|
178
|
+
|
179
|
+
<span class="ruby-keyword">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">email</span>
|
180
|
+
<span class="ruby-identifier">prompt</span> = <span class="ruby-constant">TTY</span><span class="ruby-operator">::</span><span class="ruby-constant">Prompt</span>.<span class="ruby-identifier">new</span>
|
181
|
+
<span class="ruby-identifier">email</span> = <span class="ruby-identifier">prompt</span>.<span class="ruby-identifier">ask</span>(<span class="ruby-string">'Enter invitee email:'</span>)
|
182
|
+
<span class="ruby-keyword">end</span>
|
183
|
+
|
184
|
+
<span class="ruby-identifier">payload</span> = {
|
185
|
+
<span class="ruby-value">invitation:</span> {
|
186
|
+
<span class="ruby-value">email:</span> <span class="ruby-identifier">email</span>
|
187
|
+
}
|
188
|
+
}
|
189
|
+
|
190
|
+
<span class="ruby-identifier">uri</span> = <span class="ruby-constant">URI</span>(<span class="ruby-node">"#{global_options[:api_host]}/api/invitations"</span>)
|
191
|
+
<span class="ruby-identifier">response</span> = <span class="ruby-constant">MyAsk</span><span class="ruby-operator">::</span><span class="ruby-constant">Api</span><span class="ruby-operator">::</span><span class="ruby-constant">Helper</span>.<span class="ruby-identifier">make_request</span>(<span class="ruby-string">"Post"</span>, <span class="ruby-identifier">uri</span>, <span class="ruby-identifier">global_options</span>[<span class="ruby-value">:api_key</span>], <span class="ruby-identifier">payload</span>)
|
192
|
+
|
193
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-string">"Invitation sent successfully:"</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">global_options</span>[<span class="ruby-value">:json</span>]
|
194
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-constant">JSON</span>.<span class="ruby-identifier">pretty_generate</span>(<span class="ruby-constant">JSON</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">response</span>.<span class="ruby-identifier">body</span>))
|
195
|
+
<span class="ruby-keyword">end</span>
|
196
|
+
<span class="ruby-keyword">end</span>
|
197
|
+
|
198
|
+
<span class="ruby-identifier">c</span>.<span class="ruby-identifier">default_command</span> <span class="ruby-value">:list</span>
|
199
|
+
<span class="ruby-identifier">c</span>
|
200
|
+
<span class="ruby-keyword">end</span></pre>
|
201
|
+
</div>
|
202
|
+
|
203
|
+
</div>
|
204
|
+
|
205
|
+
|
206
|
+
</div>
|
207
|
+
|
208
|
+
</section>
|
209
|
+
|
210
|
+
</section>
|
211
|
+
</main>
|
212
|
+
|