Repository navigation
Add a Flarum extension for CoworkingView price-index cards - #66
Open
erich-mueller wants to merge 1 commit into
Open
erich-mueller wants to merge 1 commit into
erich-mueller wants to merge 1 commit into
Conversation
The extension reads the public rates endpoint and shows a city card in posts and the forum sidebar, with the API attribution kept on the card. Co-authored-by: E. M. <erich-mueller@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds
integrations/flarum/, a Flarum 1.8 extension laid out as a standalone package root (coworkingview/flarum-coworkingview, title CoworkingView Coworking Prices). It is not published to Packagist from this pull request.The extension shows public Price Index figures for one city:
[coworking city=berlin](optionalproductandlocale) in posts. Figures are filled when the post is rendered, from a cached API reading, and the stored post text stays the BBCode.Every card prints the API
attributionstring and links to https://coworkingview.com. The extension code is MIT. The figures stay CC BY 4.0.How the data is fetched
One HTTPS GET to
https://api.coworkingview.com/v1/market/rateswithlocaleandcityonly. No API key and no post text.localeis always sent. A 429 or 5xx is retried once. Successful readings, unknown cities, and unpublished cities are cached for 10 minutes.COWORKINGVIEW_API_URLcan replace the origin only.Checks
composer validate --strict --no-check-publishpasses.php tests/run.phppasses (synthetic fixture, no network).npm run buildinintegrations/flarum/jssucceeds, andjs/distis committed.CI for this repo is
.github/workflows/flarum.yml. The same checks live inintegrations/flarum/.github/workflows/ci.ymlfor when that directory is the root ofcoworkingview/flarum-coworkingview.