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

feat(hub-discussions): adds Discussions package to Hub.js #479

Merged
merged 87 commits into from
Jul 7, 2021
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
87 commits
Select commit Hold shift + click to select a range
d451fd0
install
Feb 24, 2021
475be38
tests no worky
Feb 24, 2021
3bae580
wip
Mar 3, 2021
cbbaf85
adds tests
Mar 3, 2021
8640766
now geometry works?
Mar 3, 2021
8057565
quick fixes
Mar 3, 2021
75c6f90
request fix
Mar 3, 2021
dabcf87
remove unused dependencies
Mar 3, 2021
901f8f5
add back geojson
Mar 4, 2021
2ebb0d2
Merge branch 'master' into hub-discussions
Mar 4, 2021
fb34711
back to any
Mar 4, 2021
d757b60
reconfigure request
Mar 5, 2021
9e2322d
adds utils and tests
Mar 5, 2021
ce54e78
moving utils and interfaces
Mar 8, 2021
a5df8e7
add note
Mar 8, 2021
d5964c9
merge master
Mar 8, 2021
1297111
with jsdoc
Mar 9, 2021
81fe021
update code example
Mar 10, 2021
b5063b4
find* -> get*
Mar 10, 2021
647f3dc
use url-parse
Mar 10, 2021
15f00ec
IPagedAPIResponse
Mar 10, 2021
f143eea
*DTO -> *
Mar 10, 2021
0a48c19
...
Mar 10, 2021
89c1b2f
kinda maybe get geojson imported?
Mar 10, 2021
ffc9d3e
trying geojson again
Mar 10, 2021
13b3552
jk that fails in ci too
Mar 10, 2021
e1fe0c5
merge master
Mar 12, 2021
3964859
at long last includes Geometry geojson type
Mar 12, 2021
4e258d3
add delete types + some other changes
Mar 12, 2021
6da1625
portalUrl -> apiBaseUrl
Mar 12, 2021
23aaf70
allow deletion of public channels by org admins
Mar 12, 2021
14dfb07
adds IPost.appInfo
Mar 12, 2021
a77eb93
Merge branch 'master' into hub-discussions
Mar 16, 2021
dc2ed96
low-hanging PR feedback fixes
Mar 17, 2021
722c11c
copy package.json scripts
Mar 17, 2021
29b5b40
Merge branch 'master' into hub-discussions
Mar 17, 2021
ce5ce15
adds note and removes fallback apiUrl
Mar 17, 2021
3288a80
adds geometry, discussion, and appInfo fields in updatePost dto
Mar 18, 2021
6c6fbc7
fix routes for update post status & sharing
Mar 18, 2021
dabd425
get* -> fetch* & delete* -> remove*
Mar 18, 2021
9d66a80
converge style more closely with hub api requests signatures
Mar 18, 2021
4b62ecb
update sample snippet
Mar 18, 2021
09a840b
...
Mar 18, 2021
b21fd8e
remove any type
Mar 18, 2021
3eb8113
add disclaimer
Mar 19, 2021
a104be5
beta.0
Mar 22, 2021
0f782a6
publish beta.4
Mar 23, 2021
6d5b096
optional isPortal and httpMethod
Mar 24, 2021
d6ac16e
RequestInit props on IHubRequestOptions
Mar 25, 2021
21f816f
update test
Mar 26, 2021
850d285
add post method overloads
Mar 26, 2021
e5589fd
beta.7
Mar 26, 2021
f4527cd
Merge branch 'master' into hub-discussions
Apr 6, 2021
d9b4a26
add default hubApiUrl pointed at ingress qa
Apr 6, 2021
70016eb
ICreateChannel uses Partial<IWithSettings>
Apr 9, 2021
7ad7216
beta 8
Apr 9, 2021
22afec7
apiRequest handles failed fetches
Apr 19, 2021
b84677b
v1.0.0-beta.10
Apr 19, 2021
97bfa99
merge master
Apr 19, 2021
0b90ce9
string ids
Apr 22, 2021
1085c1f
expect uuids
Apr 22, 2021
57688c5
v1.0.0-beta.11
Apr 27, 2021
a2e041c
refactor interfaces
Apr 28, 2021
fd1fc8b
merge master
Apr 28, 2021
081b223
beta.12
Apr 28, 2021
ad98996
flatten reactions endpoints
Apr 28, 2021
46d653a
beta.13
Apr 28, 2021
6fdcae9
ISearchPosts.parents: (string|null)[]
Apr 29, 2021
52ce6c7
beta.14
Apr 29, 2021
bd04df7
update api base
Apr 29, 2021
e8f6182
beta.15
Apr 29, 2021
850f802
merge master
May 27, 2021
ba87a6e
update api base
May 27, 2021
7f9800e
update discussions build scripts
May 27, 2021
a4911a7
Merge branch 'master' into hub-discussions
Jun 4, 2021
c691e12
istanbul ignore cov-failing search/src/index.ts
Jun 4, 2021
08547a0
merge master
Jul 2, 2021
585fa54
merge master
Jul 2, 2021
3f5deb1
update discussions package.lock
Jul 6, 2021
70a0a4a
comment revisions
Jul 6, 2021
7e49f99
undo lint in other packages
Jul 6, 2021
12aa27c
undo lint in other packages
Jul 6, 2021
c146077
revert package-lock to jasmine 3.6.4 and jasmine-core 3.4.0
Jul 7, 2021
db98973
feat(hub-discussions): adds Discussions package to Hub.js
Jul 7, 2021
831a6f8
feat(hub-discussions): adds Discussions package to Hub.js
Jul 7, 2021
42ecaf4
revert trivial doc change
Jul 7, 2021
50ab423
update discussions version to 8.8.2
Jul 7, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
423 changes: 64 additions & 359 deletions package-lock.json

Large diffs are not rendered by default.

71 changes: 71 additions & 0 deletions packages/discussions/README.md
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
Copy link
Member

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

Copy link
Member

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...
image

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.
image

To add a Guide, add a markdown doc in /docs/src/guides... at the top of that file, add an info block like

---
title: Working with Sites and Pages.
navTitle: Sites and Pages
description: Learn how to work with Sites, Pages and Domains using @esri/hub.js.
order: 20
group: 2-concepts
---

followed 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

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 &copy; 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.
Loading