-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add user REST API #3516
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
base: master
Are you sure you want to change the base?
Add user REST API #3516
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not as well acquainted with the App Inventor client-server Java code as I once was, and of course it has changed since then, so I won't comment much on the particulars. The overall intent and structure looks generally good to me.
I am reminded, though, how wordy and over-engineered Java code can be (or at least App Inventor's Java code). I suppose I have no one to blame but myself, for much of that, though ;-)
protected static final String REST_BASE = "/rest/v1"; | ||
private static final Map<Class<?>, ResponseParser> RESPONSE_PARSERS = new HashMap<>(); | ||
static { | ||
RESPONSE_PARSERS.put(Config.class, (json) -> new Config(json)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you planning for there to be additional response classes and response parsers? I only see the one here. Otherwise, this may be premature abstraction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, one for each rpc object. You can't instainte from *.class in gwt client side ... unless I am missing something ...
@jisqyv you had mentioned I should check into this when you were looking over my code. I don't think I need to do anything as I send relative URLs with no protocol & host to appinventor-sources/appinventor/appengine/src/com/google/appinventor/client/Ode.java Lines 743 to 748 in d0127d6
appinventor-sources/appinventor/appengine/src/com/google/appinventor/client/Ode.java Lines 2580 to 2589 in d0127d6
|
General items:
ant tests
passes on my machineIf your code changes how something works on the device (i.e., it affects the companion):
ucr
ucr
as the baseFurther, if you've changed the blocks language or another user-facing designer/blocks API (added a SimpleProperty, etc.):
For all other changes:
master
master
as the baseWhat does this PR accomplish?
Description
Fixes # .
Resolves # .