-
Notifications
You must be signed in to change notification settings - Fork 13
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
feat(hub-discussions): adds Discussions package to Hub.js #479
Merged
Merged
Changes from 20 commits
Commits
Show all changes
87 commits
Select commit
Hold shift + click to select a range
d451fd0
install
475be38
tests no worky
3bae580
wip
cbbaf85
adds tests
8640766
now geometry works?
8057565
quick fixes
75c6f90
request fix
dabcf87
remove unused dependencies
901f8f5
add back geojson
2ebb0d2
Merge branch 'master' into hub-discussions
fb34711
back to any
d757b60
reconfigure request
9e2322d
adds utils and tests
ce54e78
moving utils and interfaces
a5df8e7
add note
d5964c9
merge master
1297111
with jsdoc
81fe021
update code example
b5063b4
find* -> get*
647f3dc
use url-parse
15f00ec
IPagedAPIResponse
f143eea
*DTO -> *
0a48c19
...
89c1b2f
kinda maybe get geojson imported?
ffc9d3e
trying geojson again
13b3552
jk that fails in ci too
e1fe0c5
merge master
3964859
at long last includes Geometry geojson type
4e258d3
add delete types + some other changes
6da1625
portalUrl -> apiBaseUrl
23aaf70
allow deletion of public channels by org admins
14dfb07
adds IPost.appInfo
a77eb93
Merge branch 'master' into hub-discussions
dc2ed96
low-hanging PR feedback fixes
722c11c
copy package.json scripts
29b5b40
Merge branch 'master' into hub-discussions
ce5ce15
adds note and removes fallback apiUrl
3288a80
adds geometry, discussion, and appInfo fields in updatePost dto
6c6fbc7
fix routes for update post status & sharing
dabd425
get* -> fetch* & delete* -> remove*
9d66a80
converge style more closely with hub api requests signatures
4b62ecb
update sample snippet
09a840b
...
b21fd8e
remove any type
3eb8113
add disclaimer
a104be5
beta.0
0f782a6
publish beta.4
6d5b096
optional isPortal and httpMethod
d6ac16e
RequestInit props on IHubRequestOptions
21f816f
update test
850d285
add post method overloads
e5589fd
beta.7
f4527cd
Merge branch 'master' into hub-discussions
d9b4a26
add default hubApiUrl pointed at ingress qa
70016eb
ICreateChannel uses Partial<IWithSettings>
7ad7216
beta 8
22afec7
apiRequest handles failed fetches
b84677b
v1.0.0-beta.10
97bfa99
merge master
0b90ce9
string ids
1085c1f
expect uuids
57688c5
v1.0.0-beta.11
a2e041c
refactor interfaces
fd1fc8b
merge master
081b223
beta.12
ad98996
flatten reactions endpoints
46d653a
beta.13
6fdcae9
ISearchPosts.parents: (string|null)[]
52ce6c7
beta.14
bd04df7
update api base
e8f6182
beta.15
850f802
merge master
ba87a6e
update api base
7f9800e
update discussions build scripts
a4911a7
Merge branch 'master' into hub-discussions
c691e12
istanbul ignore cov-failing search/src/index.ts
08547a0
merge master
585fa54
merge master
3f5deb1
update discussions package.lock
70a0a4a
comment revisions
7e49f99
undo lint in other packages
12aa27c
undo lint in other packages
c146077
revert package-lock to jasmine 3.6.4 and jasmine-core 3.4.0
db98973
feat(hub-discussions): adds Discussions package to Hub.js
831a6f8
feat(hub-discussions): adds Discussions package to Hub.js
42ecaf4
revert trivial doc change
50ab423
update discussions version to 8.8.2
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,71 @@ | ||
[![npm version][npm-img]][npm-url] | ||
[![build status][travis-img]][travis-url] | ||
[![gzip bundle size][gzip-image]][npm-url] | ||
[![Coverage Status][coverage-img]][coverage-url] | ||
[![apache licensed](https://img.shields.io/badge/license-Apache-green.svg?style=flat-square)](https://raw.githubusercontent.com/Esri/hub.js/master/LICENSE) | ||
|
||
[npm-img]: https://img.shields.io/npm/v/@esri/hub-discussions.svg?style=flat-square | ||
[npm-url]: https://www.npmjs.com/package/@esri/hub-discussions | ||
[travis-img]: https://img.shields.io/travis/Esri/hub.js/master.svg?style=flat-square | ||
[travis-url]: https://travis-ci.org/Esri/hub.js | ||
[gzip-image]: https://img.badgesize.io/https://unpkg.com/@esri/hub-discussions/dist/umd/discussions.umd.min.js?compression=gzip | ||
[coverage-img]: https://codecov.io/gh/Esri/hub.js/branch/master/graph/badge.svg | ||
[coverage-url]: https://codecov.io/gh/Esri/hub.js | ||
|
||
# @esri/hub-discussions | ||
|
||
> Module to interact with ArcGIS Hub Annotations in Node.js and modern browsers. | ||
|
||
### Example | ||
|
||
```bash | ||
npm install @esri/hub-discussions | ||
cpgruber marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
```js | ||
import { searchPosts } from "@esri/hub-discussions"; | ||
|
||
// get posts for org | ||
searchPosts({ access: ['org'], orgs: ['3ef']}).then(response => { | ||
return response.items; | ||
// [ | ||
// IPostDTO{}, | ||
// ... | ||
// ] | ||
}); | ||
``` | ||
|
||
## [API Reference](https://esri.github.io/hub.js/api/annotations/) | ||
cpgruber marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Issues | ||
|
||
If something isn't working the way you expected, please take a look at [previously logged issues](https://github.com/Esri/hub.js/issues) first. Have you found a new bug? Want to request a new feature? We'd [**love**](https://github.com/Esri/hub.js/issues/new) to hear from you. | ||
|
||
If you're looking for help you can also post issues on [GIS Stackexchange](http://gis.stackexchange.com/questions/ask?tags=esri-oss). | ||
|
||
### Versioning | ||
|
||
For transparency into the release cycle and in striving to maintain backward compatibility, @esri/hub.js is maintained under Semantic Versioning guidelines and will adhere to these rules whenever possible. | ||
|
||
For more information on SemVer, please visit <http://semver.org/>. | ||
|
||
### Contributing | ||
|
||
Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](CONTRIBUTING.md). | ||
|
||
### License | ||
|
||
Copyright © 2021 Esri | ||
|
||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
|
||
> http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
|
||
A copy of the license is available in the repository's [LICENSE](../../LICENSE) file. |
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.
@cpgruber can you add some more examples of using the API with specifics usages in the response. We are trying out RDD to design/update the rest of Hub.js to consider the DX (Developer Experience) making it easy to pickup + use the library by Hub + non-Hub engineers.
/cc @tomwayson @dbouwman @rweber-esri
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.
Examples in the function jsdoc will appear in the doc w/ the function... here so it's a great way to show simple usage...
Another good idea is to add a Guide into the docs... guides are a great place to show how to do common things... i.e.
To add a Guide, add a markdown doc in
/docs/src/guides
... at the top of that file, add an info block likefollowed by the content.
Then run
npm run docs:serve
and it will fire up the doc site w/ a watcher - I don't think it will live-reload, but it will rebuild the doc a you save files