File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed
examples/Umbraco.AuthorizedServices.TestSite Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,22 @@ public class TestAuthorizedServicesController : UmbracoApiController
1212
1313 public TestAuthorizedServicesController ( IAuthorizedServiceCaller authorizedServiceCaller ) => _authorizedServiceCaller = authorizedServiceCaller ;
1414
15+ // /umbraco/api/TestAuthorizedServices/GetMeetupSelfUserInfo
16+ public async Task < IActionResult > GetMeetupSelfUserInfo ( )
17+ {
18+ // This makes a GraphQL query
19+ var response = await _authorizedServiceCaller . SendRequestRawAsync (
20+ "meetup" ,
21+ "/gql" ,
22+ HttpMethod . Post ,
23+ new MeetupRequest
24+ {
25+ Query = "query { self { id name bio city } }"
26+ } ) ;
27+
28+ return Content ( response ) ;
29+ }
30+
1531 public async Task < IActionResult > GetUmbracoContributorsFromGitHub ( )
1632 {
1733 List < GitHubContributorResponse > ? response = await _authorizedServiceCaller . GetRequestAsync < List < GitHubContributorResponse > > (
Original file line number Diff line number Diff line change 1+ using Newtonsoft . Json ;
2+
3+ namespace Umbraco . AuthorizedServices . TestSite . Models . ServiceResponses
4+ {
5+ public class MeetupRequest
6+ {
7+ [ JsonProperty ( "query" ) ]
8+ public string Query { get ; set ; } = string . Empty ;
9+ }
10+ }
Original file line number Diff line number Diff line change 496496 "ExchangeTokenWhenExpiresWithin" : " 25.00:00:00"
497497 },
498498 "RefreshAccessTokenWhenExpiresWithin" : " 00.00:00:40"
499+ },
500+ "meetup" : {
501+ "DisplayName" : " Meetup" ,
502+ "ApiHost" : " https://api.meetup.com" ,
503+ "IdentityHost" : " https://secure.meetup.com" ,
504+ "TokenHost" : " https://secure.meetup.com" ,
505+ "RequestIdentityPath" : " /oauth2/authorize" ,
506+ "AuthorizationUrlRequiresRedirectUrl" : true ,
507+ "RequestTokenPath" : " /oauth2/access" ,
508+ "RequestTokenFormat" : " FormUrlEncoded" ,
509+ "ClientId" : " " ,
510+ "ClientSecret" : " " ,
511+ "SampleRequest" : " /gql"
499512 }
500513 }
501514 }
You can’t perform that action at this time.
0 commit comments