Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/flexseth/polygon-block
Polygon block to demonstrate API access with Gutenberg.
https://github.com/flexseth/polygon-block
Last synced: about 1 hour ago
JSON representation
Polygon block to demonstrate API access with Gutenberg.
- Host: GitHub
- URL: https://github.com/flexseth/polygon-block
- Owner: flexseth
- Created: 2023-08-25T02:07:05.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-05T22:44:42.000Z (about 1 year ago)
- Last Synced: 2024-10-14T22:14:47.943Z (about 1 month ago)
- Language: Mustache
- Size: 194 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mission Objective
Showcase using the SWR data fetching library with a bleeding edge WordPress + React component, to create a user interface that displays in the editor. The user should be able to type in a stock symbol that is publicly traded on the Dow Jones Industrial Average (DJIA) and the most recent closing price shows up in the display pane.### Todo
### Release 1.0
- [x] WordPress InputControl working on back-end, data persistance
- [ ] Basic return of API call with SWR, from Polygon
- [x] Adding Debounce to wait to call API
- [ ] Showcase getting system date via data store calls `wp.select`
- [ ] Reuse code from React app to calculate date for API call
- [ ] Simple block display in editor
- [ ] Send off for review### Release 1.2
- [ ] Create front-end widget to display data? - Edit create/block template
- [ ] Dynamic variant (rendered server side with php) - not SSR!
- [ ] Add in variant with Interactivity API
- [ ] Add API key settings field (in lieu of hard coded)
- [ ] Toggle Polygon views (daily, all time, monthly/etc) - Interactivity API
- [ ] Send off for review### Release 1.3
- [ ] Use custom post types to create ticker widgets that can display across pages
- [ ] Create new "closing price" widget - CPT UI
- [ ] Allow for exporting of widget HTML code, create a new template part with
- [ ] Move to a certain page area based on category or tag
- [ ] Allow to only have one block per page or post
- [ ]### Todo: Enhancements
- [ ] *MUSTACHE* API template, include a flag for API key on scaffolding
- [ ] *MUSTACHE* Improve API template### Installation
- Register for Polygon/API key
- Clone repository
`git clone https://github.com/flexseth/polygon-block`
- Add your key to the file API_KEY, - "REPLACE_WITH_YOUR_API_KEY"
- Scaffold block with SWR
- Activate plugin
- Add Polygon block to your post or page to see it work
-
### Changelog
- 1.2.3 Scaffolded using Ryan Welcher's SWR/API-template create-block package