Skip to content
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

More initiatives #3

Merged
merged 4 commits into from
Apr 27, 2018
Merged

More initiatives #3

merged 4 commits into from
Apr 27, 2018

Conversation

tomwayson
Copy link
Member

use in favor of #1

@jgravois jgravois merged commit a15c7a4 into master Apr 27, 2018
@jgravois jgravois deleted the more-initiatives branch April 27, 2018 21:32
@jgravois jgravois mentioned this pull request Apr 27, 2018
Copy link
Member Author

@tomwayson tomwayson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

naming things is hard

package.json Outdated
@@ -18,6 +18,10 @@
"cross-spawn": "^5.1.0",
"cz-lerna-changelog": "github:patrickarlt/cz-lerna-changelog#3fe7650a2e2e624b1f46e5031c96119759698288",
"date-fns": "^1.29.0",
"@esri/arcgis-rest-request": "^1.1.1",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove these since they are dependencies

package.json Outdated
@@ -65,7 +69,10 @@
"isomorphic-fetch": "^2.2.1",
"isomorphic-form-data": "^1.0.0",
"tslib": "^1.8.1",
"@esri/arcgis-rest-request": "^1.1.1"
"@esri/arcgis-rest-request": "^1.1.1",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove these and have the individual packages declare their dependencies on arcgis-rest-js packages.

"peerDependencies": {
},
"devDependencies": {
"@esri/arcgis-rest-request": "^1.1.1",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move these to dependencies

* @param requestOptions - Request options that may have authentication manager
* @returns A Promise that will resolve with the Initiative item and data
*/
export function getInitiativeWithData(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like @jgravois' idea of having getInitiative() return the data by default unless the consumer supplies a data: false option. We can then remove getInitiativeWithData()

* @param requestOptions - Request options that may have authentication manager
* @returns A Promise that will resolve with the Initiative site's domain. Consumer needs to add the protocol
*/
export function lookupSiteUrlByInitiative(
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ultimately we'll want this package to depend on a sites package that exposes getDomain() or lookupDomain() fn that takes a siteId and calls https://hubqa.arcgis.com/utilities/domains?siteId=72900e205eb3479a8cac3d47f56f75fe - in the mean time, we can just create and export that in this package. This fn should be getSiteDomain() and it should take an initiative argument either as a string or an IInitiative, if the former, then call getInitiative().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants