ga-wdi-boston / api-token-auth Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Add a reference and link to httpbin
Check the document carefully.
We show them resources, and we show them auth, but never an authenticated resource request. If @gaand's vision of doing everything authenticated from the start comes true, I don't think this is necessary, but if I have extra time tomorrow, I may talk a little bit about how to do that.
Map to JavaScript use of app.api
.
> Rack::Utils.parse_nested_query('credentials[email][email protected]&credentials[password]=abc123')
=> {"credentials"=>{"email"=>"[email protected]", "password"=>"abc123"}}
> ActiveSupport::JSON.decode '{"credentials": {"email":"[email protected]","password":"abc123"}}'
=> {"credentials"=>{"email"=>"[email protected]", "password"=>"abc123"}}
As opposed to hardcoding API URL in curl scripts
even if they only console.log
.
demo
has better example code. solution
currently has the same code as master
, which we typically consider starter code.
via @gaand
Which means we're teaching them to console.log and console.error, which is wrong.
Building off of #5, explicitly export and require functions from different files.
See ga-wdi-boston/planning#5
(Formerly https://github.com/ga-wdi-boston/010/issues/4)
Avoid oneliner arrow functions and the time and confusion that result?
so replace
const signIn = (data) =>
$.ajax({
// ...
});
with
const signIn = function (data) {
return $.ajax({
// ...
});
};
We created this in class.
This feels very much like part of the jquery-ajax-foo sequence (even though it's technically not using the previous/solution
-> current/master format
, but doesn't follow the same naming convention. Do we a) want to put it into that sequence, where it follows that convention? Or rename it to above? Maybe this is two issues...
jQuery.ajax, FormData, etc.
setup functions like
const changePassword = function changePassword(foo){}
via @gaand
Some scripts use JSON, others use URL-encoded. Other than mentioning that URL-encoded is what actually gets sent over the wire, is there a purpose for doing both kinds for all scripts? Or is this something we can just show once with the sign-up or sign-in script and then just use the -json.sh
scripts for the rest?
via @gaand
$ID and $TOKEN. This may need to be opened on library-api-guide
, not here, but this is the repo that I noticed it in.
@gaand and @jrhorn424 both came up to me after this lesson and mentioned that the lesson left out a good bit of the "why" and focused mostly on the "how." I agree that this is important, but also looked back and noticed that it doesn't exist at all in the README. It should be added. If not by them, than by whoever delivers this next.
@payne-chris-r asked me to open this. There are two scripts for the same thing and it's confusing.
change-password-json.sh and change-password.sh
via @gaand
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.