Giter Club home page Giter Club logo

Comments (14)

alexsapps avatar alexsapps commented on August 16, 2024

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.

alexsapps avatar alexsapps commented on August 16, 2024

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.

alexsapps avatar alexsapps commented on August 16, 2024

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.

jesperfj avatar jesperfj commented on August 16, 2024

@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.

jesperfj avatar jesperfj commented on August 16, 2024

@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.

alexsapps avatar alexsapps commented on August 16, 2024

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.

alexsapps avatar alexsapps commented on August 16, 2024

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.

jesperfj avatar jesperfj commented on August 16, 2024

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.

alexsapps avatar alexsapps commented on August 16, 2024

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.

jesperfj avatar jesperfj commented on August 16, 2024

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.

jesperfj avatar jesperfj commented on August 16, 2024

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.

jesperfj avatar jesperfj commented on August 16, 2024

@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.

jesperfj avatar jesperfj commented on August 16, 2024

Closing this. Reopen if you have more feedback.

from force-rest-api.

quintencls avatar quintencls commented on August 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.