-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API method signature refactor #78
Merged
Merged
Changes from 11 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
236efc2
refactor methods to take one argument
jgravois 9822538
Smart usage of FormData
patrickarlt 4f040d4
merge
patrickarlt 2386a81
fixes for most of the tests
jgravois eb3dc8e
last text fixes
jgravois 710b97b
use .some instead of .every for form data check
patrickarlt b9ed713
move encodeParam to rest-request
patrickarlt 4752e92
encoded param helper is in request/utils now
jgravois e9297ff
Merge pull request #77 from Esri/smart-form-data
jgravois c5fb2b3
Merge remote-tracking branch 'upstream/master' into r/options-object
jgravois 2f527f7
Merge remote-tracking branch 'upstream/r/options-object' into r/optio…
jgravois 8e4577f
address pats excellent feedback
jgravois 8810bf2
get branch coverage back up to 100%
jgravois 90fa2f9
more geocoder refactoring
jgravois 08dbf21
update doc
jgravois b7a84fd
refactor searchItems to accept a raw string
jgravois File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
packages/arcgis-rest-auth/src/AuthenticatedRequestOptions.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { ApplicationSession } from "./ApplicationSession"; | ||
import { UserSession } from "./UserSession"; | ||
|
||
import { IRequestOptions } from "@esri/arcgis-rest-request"; | ||
|
||
/** | ||
* Used internally by packages for requests that require authentication. | ||
*/ | ||
export interface IAuthenticatedRequestOptions extends IRequestOptions { | ||
authentication: UserSession | ApplicationSession; | ||
} | ||
|
||
/** | ||
* Used internally by packages for requests that require user authentication. | ||
*/ | ||
export interface IUserRequestOptions extends IRequestOptions { | ||
authentication: UserSession; | ||
} | ||
|
||
/** | ||
* Used internally by packages for requests that require application authentication. | ||
*/ | ||
export interface IApplicationRequestOptions extends IRequestOptions { | ||
authentication: ApplicationSession; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,9 @@ export function fetchToken( | |
url: string, | ||
params: IFetchTokenParams | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jgravois I think it might be a little confusing to call this |
||
): Promise<IFetchTokenResponse> { | ||
return request(url, params).then((response: IFetchTokenRawResponse) => { | ||
return request(url, { | ||
params | ||
}).then((response: IFetchTokenRawResponse) => { | ||
const r: IFetchTokenResponse = { | ||
token: response.access_token, | ||
username: response.username, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no methods in the API that only accept an application login. We can probably safely remove this.