File tree Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Expand file tree Collapse file tree 4 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
1
name = " midas_sdk"
2
- version = " 0.1.4 "
2
+ version = " 0.1.5 "
3
3
target = " javascript"
4
4
5
5
description = " A bag of SDK's that can be used with midas."
Original file line number Diff line number Diff line change @@ -22,8 +22,12 @@ const auth_host = "dnsimple.com"
22
22
const auth_path = "/oauth/authorize"
23
23
24
24
pub fn authenticate ( app ) {
25
- let App ( client_id , client_secret , redirect_uri ) = app
26
25
let state = int . to_string ( int . random ( 1_000_000_000 ) )
26
+ do_authenticate ( app , state )
27
+ }
28
+
29
+ pub fn do_authenticate ( app , state ) {
30
+ let App ( client_id , client_secret , redirect_uri ) = app
27
31
let url = auth_url ( client_id , redirect_uri , state )
28
32
use redirect <- t . do ( t . follow ( url ) )
29
33
use # ( code , returned_state ) <- t . try (
@@ -106,7 +110,7 @@ pub fn token_response(response) {
106
110
Ok ( token )
107
111
}
108
112
109
- const api_host = "api.dnsimple.com"
113
+ pub const api_host = "api.dnsimple.com"
110
114
111
115
fn base_request ( token ) {
112
116
request . new ( )
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ pub fn token_response(response) {
103
103
Ok ( token )
104
104
}
105
105
106
- const api_host = "api.linkedin.com"
106
+ pub const api_host = "api.linkedin.com"
107
107
108
108
fn base_request ( token ) {
109
109
request . new ( )
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ fn key_find(items, key) {
85
85
|> result . replace_error ( "Did not find key: " <> key )
86
86
}
87
87
88
- const api_host = "api.twitter.com"
88
+ pub const api_host = "api.twitter.com"
89
89
90
90
const token_path = "/2/oauth2/token"
91
91
You can’t perform that action at this time.
0 commit comments