Comments (14)
i think i have a similar need. i need to make use of apiRequest() and baseUri() so i can make different kinds of rest calls, such as changing the user's password (which can't be done with updateSObject), and using the Chatter REST api (except for that there is https://github.com/forcedotcom/JavaChatterRESTApi which unfortunately does not share any code with this repo).
should ForceApi be extendable? or could apiRequest() and baseUri() just be made public and/or moved into a util class?
pull requests welcome?
from force-rest-api.
and on the ForceApi, getters for session and config would make life a little easier. not sure what design principles this would break.
by the way, this repo could be part of https://github.com/forcedotcom
maybe tha'd make it more popular or somethen.
from force-rest-api.
by the way again, would SOQL support belong here? some copypasteable code here: https://developer.salesforce.com/page/Getting_Started_with_the_Force.com_REST_API
thanks for this by the way. pretty nifty project you got here.
from force-rest-api.
@ykoer apologize for missing your request.
Pull requests are absolutely welcome. It's a long time ago that I spent time on this code base so it would help a lot if you can send pull requests with a clear example of how you want it to work (in addition to the PR itself).
from force-rest-api.
@ykoer & @alexsapps: would love to support this request if it's still relevant to you, or close this issue if you've moved on. Seeing some sample code of what you have in mind would be great.
from force-rest-api.
hey @jesperfj, in my fork i added the ability to create custom commands (like the chatter api) while trying somewhat to maintain backward compatibility. only the parts that i was using are tested however. see here if you're interested:
https://github.com/alexsapps/force-rest-api/tree/improvementsMarch2015
from force-rest-api.
i'm curious what you think about it too, but i can't invest much time to fix anything right now unfortunately. thanks again for this api -- it was very useful while i was working on a gus integration for the db schema team :)
from force-rest-api.
Took a look at your fork. Lots of interesting stuff in there. Probably way too much to ever try to merge back into this library.
It's probably better to figure out how this library can be used as part of a composition. Perhaps I need to cut it down to just the Auth and other basic parts (the request/response logic) and factor the REST API calls into another lib.
from force-rest-api.
sure, sounds good to me. would it have helped if i told you about my fork
earlier or still would've been too much? i wasnt sure, and then i forgot,
subconsciously assuming people look at the github fork tree. i am new to
this stuff so any tips glady accepted. hahah.
hmm, two libs is potentially unnecessary compexity too since the outer lib
won't have much. the chatter api for example is one lib, extensible and
provides command classes for the most basic operations.
thanks!
On Tue, 28 Apr 2015 20:13 Jesper Joergensen [email protected]
wrote:
Took a look at your fork. Lots of interesting stuff in there. Probably way
too much to ever try to merge back into this library.It's probably better to figure out how this library can be used as part of
a composition. Perhaps I need to cut it down to just the Auth and other
basic parts (the request/response logic) and factor the REST API calls into
another lib.—
Reply to this email directly or view it on GitHub
#14 (comment)
.
from force-rest-api.
It would probably have helped if you had submitted pull requests along the way for your various improvements. I am not sure at all if splitting up this library is the best idea. It's just a thought I had and as you can tell, I haven't taken any action on it so far :-). I've been pretty lenient with accepting contributions because I don't have much time to work on this myself and I don't know that this library has critical customers with strong requirements for stability.
from force-rest-api.
I took a stab at a possible approach to make it more extensible in #24. Would love your feedback. I moved apiRequest() to ApiSession. uriBase() still seems like just a utility method specific to ForceApi so I didn't move it.
from force-rest-api.
@ykoer and @alexsapps, take a look at #41 and release 0.0.35 and see if it meets your use cases.
from force-rest-api.
Closing this. Reopen if you have more feedback.
from force-rest-api.
Hi @jesperfj First of all, thanks writing the library!
I would also like to use it to make a call to a custom apex endpoint. But these have a path like the following: /services/apexrest/...
.
The lowest level public
method I can find in the ForceApi
class is the request()
method, this one still prepends /services/data/<version>
to the path that it is given.
Maybe you could add a method similar to this: apexRequest(String method, String path, Object input)
? That would prepend the given path with /services/apexrest
and use the private apiRequest(HttpRequest req)
method to make the authenticated call.
It's just an idea after a quick look at the code.
from force-rest-api.
Related Issues (20)
- Add formula to DescribeSObject.Field
- Force REST API - giving below exception
- Springboot 3.3 Stream closed HOT 2
- Return http responses instead of void calls
- updateSObject: "The Id field should not be specified in the sobject data" HOT 1
- Missing instance_url and id in ApiSession HOT 2
- Support for jdk 10 HOT 1
- Support for Blob data HOT 2
- Redirect not working HOT 1
- did not save the the id of the created object. any way to update the object?
- Test failure on v46 HOT 2
- Support for Salesforce Platform Events HOT 1
- Adding support for batch size for SOQL HOT 5
- Provide support for Rest Resource calls. HOT 1
- JDK 8, mvn install -DskipTests is failing. HOT 1
- Username and password are not escaped in soap login.
- Is support search api now? HOT 4
- Add support for Headers HOT 1
- autoRenew in ForceAPI.java not working
- Add support for JWT Bearer Flow HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from force-rest-api.