gatsbyjs / api.gatsbyjs.org Goto Github PK
View Code? Open in Web Editor NEWThe API for the Gatsby swag store.
The API for the Gatsby swag store.
In order to qualify for tier 2, contributors need to have made five or more contributions (currently measured as PRs -- so 5+ PRs)
On login, we already check number of contributions. Need to add additional logic for tier 2.
Right now the get()
helper requires passing in a query string, e.g. foo=bar&bat=baz
.
It would be better if we could pass in an object, e.g.:
get(uri, { foo: 'bar', bat: 'baz' })
This would be converted to a query string (could use a lib such as querystring
), which makes it a little easier to use this helper.
The /store/discount-code
endpoint receives a subscribe
parameter.
subscribe
parameter to the docssubscribe
parameter and only call MailChimp if it’s set to true
As I was discovering the bug resolved in #7, I noticed that I was able to apply the promo code again to get free swag. I didn't fully complete the checkout, so I don't know if there would have been an error, but I would have expected Shopify to have warned about an invalid code.
A bit of research revealed shopify has a once_per_customer
option for their PriceRules
. I wanted to point this out incase you don't have it set.
NOTE: This issue is an epic, which bundles up lots of related issues into a single goal. If you have the free ZenHub extension, you’ll be able to see overall progress and related issues, as well as a "board view" that shows this epic from a bird's-eye view.
This is a sub-epic of gatsbyjs/store.gatsbyjs.org#168
Area of Responsibility: Ecosystem
Role | Name | RACI |
---|---|---|
AoR owner | @amberleyromo | Consulted about the epic |
Domain owner | @amberleyromo | Informed about epic |
Project manager | @jlengstorf | Responsible for setting epic tasks |
Tech lead | @amberleyromo | Accountable for setting guidelines for epic |
Contributors | @amberleyromo @jlengstorf | Responsible for completing assigned tasks |
Extend the Gatsby store API to support multiple levels of contributor rewards, as well as keeping track of whether or not a contributor has used a given discount code.
Domains
We know this is a success when the API returns sufficient data to complete the parent epic.
We have intermittent CORS failures, and the flow seems to be something like this:
I have no proof, but my suspicion is that this is an issue with AWS Lambda "cold starts". I'm not sure if there's a for-real fix, but the smash-it-with-a-hammer fix is to keep the lamda warm.
Looks like Serverless has a plugin for this (see this tutorial), so we just need to put this in place.
See https://github.com/octokit/graphql.js — need to check if the GraphQL API supports all the things we need, though.
(ported from @jlengstorf comment: https://github.com/gatsbyjs/store.gatsbyjs.org/issues/170#issuecomment-435932868)
I think the way this will work is:
Relates to #170
cc @DSchau
We need a way to send anonymous usage data from the Gatsby CLI. This will require creating an endpoint in the API that accepts a data object (such as the envinfo and other data about a Gatsby site that helps us debug) and stores it somewhere secure.
Potentially, this will allow us to create public data visualizations (via new queries that will expose various stats about Gatsby usage). We'll have to think more about whether there are any risks to making usage data publicly queryable, but it would be really cool to be able to see how Gatsby is growing, what plugins/starters are popular, etc.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.