11using GithubSharp . Core . Services ;
22using System . Collections . Generic ;
3+ using GithubSharp . Core . Base ;
34
45namespace GithubSharp . Core . API
56{
@@ -20,29 +21,29 @@ public Gist(
2021 string . Format (
2122 "users/{0}/gists" ,
2223 username ) ,
23- " GET" ) . Result ;
24+ GithubSharpHttpVerbs . GET ) . Result ;
2425 }
2526 public IEnumerable < Models . Gist > List ( )
2627 {
2728 return base . Get < IEnumerable < Models . Gist > > (
2829 string . Format (
2930 "users/{0}/gists" ,
3031 base . AuthProvider . Username ) ,
31- " GET" ) . Result ;
32+ GithubSharpHttpVerbs . GET ) . Result ;
3233 }
3334
3435 public IEnumerable < Models . Gist > Public ( )
3536 {
3637 return base . Get < IEnumerable < Models . Gist > > (
3738 "gists/public" ,
38- " GET" ) . Result ;
39+ GithubSharpHttpVerbs . GET ) . Result ;
3940 }
4041
4142 public IEnumerable < Models . Gist > Starred ( )
4243 {
4344 return base . Get < IEnumerable < Models . Gist > > (
4445 "gists/starred" ,
45- " GET" ) . Result ;
46+ GithubSharpHttpVerbs . GET ) . Result ;
4647 }
4748
4849 public Models . Gist Get ( string id )
@@ -51,14 +52,14 @@ public Models.Gist Get(string id)
5152 string . Format (
5253 "gists/{0}" ,
5354 id ) ,
54- " GET" ) . Result ;
55+ GithubSharpHttpVerbs . GET ) . Result ;
5556 }
5657
5758 public Models . Gist Create ( Models . GistToCreateOrEdit gist )
5859 {
5960 return base . Get < Models . Gist , Models . GistToCreateOrEdit > (
6061 "gists" ,
61- " POST" ,
62+ GithubSharpHttpVerbs . POST ,
6263 gist ) . Result ;
6364 }
6465
@@ -68,7 +69,7 @@ public Models.Gist Edit(string id, Models.GistToCreateOrEdit gist)
6869 string . Format (
6970 "gists/{0}" ,
7071 id ) ,
71- " PATCH" ,
72+ GithubSharpHttpVerbs . PATCH ,
7273 gist ) . Result ;
7374 }
7475
@@ -78,7 +79,7 @@ public void Star(string id)
7879 string . Format (
7980 "gists/{0}/star" ,
8081 id ) ,
81- " PUT" ) ;
82+ GithubSharpHttpVerbs . PUT ) ;
8283 }
8384
8485 public void Unstar ( string id )
@@ -87,7 +88,7 @@ public void Unstar(string id)
8788 string . Format (
8889 "gists/{0}/star" ,
8990 id ) ,
90- " DELETE" ) ;
91+ GithubSharpHttpVerbs . DELETE ) ;
9192 }
9293
9394 public bool HasStar ( string id )
@@ -96,7 +97,7 @@ public bool HasStar(string id)
9697 string . Format (
9798 "gists/{0}/star" ,
9899 id ) ,
99- " GET"
100+ GithubSharpHttpVerbs . GET
100101 ) . StatusCode == 204 ;
101102 }
102103
@@ -106,7 +107,7 @@ public Models.Gist Fork(string id)
106107 string . Format (
107108 "gists/{0}/fork" ,
108109 id ) ,
109- " POST" ) . Result ;
110+ GithubSharpHttpVerbs . POST ) . Result ;
110111 }
111112
112113 public void Delete ( string id )
@@ -115,46 +116,46 @@ public void Delete(string id)
115116 string . Format (
116117 "gists/{0}" ,
117118 id ) ,
118- " DELETE" ) ;
119+ GithubSharpHttpVerbs . DELETE ) ;
119120
120121 }
121122
122- public IEnumerable < Models . GistComment > ListComments ( string gistid )
123+ public IEnumerable < Models . Comment > ListComments ( string gistid )
123124 {
124- return base . Get < IEnumerable < Models . GistComment > > (
125+ return base . Get < IEnumerable < Models . Comment > > (
125126 string . Format (
126127 "gists/{0}/comments" ,
127128 gistid ) ,
128- " GET" ) . Result ;
129+ GithubSharpHttpVerbs . GET ) . Result ;
129130 }
130131
131- public Models . GistComment CreateComment ( string gistid , Models . GistCommentForCreationOrEdit comment )
132+ public Models . Comment CreateComment ( string gistid , Models . CommentForCreationOrEdit comment )
132133 {
133- return base . Get < Models . GistComment , Models . GistCommentForCreationOrEdit > (
134+ return base . Get < Models . Comment , Models . CommentForCreationOrEdit > (
134135 string . Format (
135136 "gists/{0}/comments" ,
136137 gistid ) ,
137- " POST" ,
138+ GithubSharpHttpVerbs . POST ,
138139 comment ) . Result ;
139140 }
140141
141142
142- public Models . GistComment GetComment ( string gistcommentid )
143+ public Models . Comment GetComment ( string gistcommentid )
143144 {
144- return base . Get < Models . GistComment > (
145+ return base . Get < Models . Comment > (
145146 string . Format (
146147 "gists/comments/{0}" ,
147148 gistcommentid ) ,
148- " GET" ) . Result ;
149+ GithubSharpHttpVerbs . GET ) . Result ;
149150 }
150151
151- public Models . GistComment EditComment ( string gistcommentid , Models . GistCommentForCreationOrEdit comment )
152+ public Models . Comment EditComment ( string gistcommentid , Models . CommentForCreationOrEdit comment )
152153 {
153- return base . Get < Models . GistComment , Models . GistCommentForCreationOrEdit > (
154+ return base . Get < Models . Comment , Models . CommentForCreationOrEdit > (
154155 string . Format (
155156 "gists/comments/{0}" ,
156157 gistcommentid ) ,
157- " PATCH" ,
158+ GithubSharpHttpVerbs . PATCH ,
158159 comment ) . Result ;
159160 }
160161
@@ -164,7 +165,7 @@ public void DeleteComment(string gistcommentid)
164165 string . Format (
165166 "gists/comments/{0}" ,
166167 gistcommentid ) ,
167- " DELETE" ) ;
168+ GithubSharpHttpVerbs . DELETE ) ;
168169 }
169170
170171
0 commit comments