Code Monkey home page Code Monkey logo

Comments (1)

nathancday avatar nathancday commented on July 22, 2024

Absolutely! Would love to get some more API endpoints wrapped with R code.

My thoughts to your bullets:

Should there be separate user-level functions for add, update and removing shared links, or attempt to consolidate?

I think there are probably at least 7 functions.
3 internal: GET _shared_link, GET _shared_link/file_id, PUT _shared_link/file_id
4 external: find_folder, get_link, add_link, delete_link

Whether to ignore bad param combinations as i currently do or throw errors

I think boxr should faithfully return the APIs response here. If there is an error throw it, if not carry on.

Including the unshared at and vanity name request options

We should be exposing as much of the API as possible for users to manipulate. I think these should be included

What should be an internal vs external function in boxr

Externals are nice human readables that collect arguments for the Internals, like get tokens and paths, maybe decorate with classes.
Internals are the cURL commands, doing the RETRY logic, the GET / PUT path the API wants.

I haven't done anything to wrap the httr result into a boxr object, so need to figure out which ones are available/whether we need a new one

Lets save this for last

Is there anything more opinionated that we could do? Some vague ideas include combining the file and folder endpoints, or adding auto share to some of the upload functions.

Combining endpoints might be less verbose if the two APIs are identical. But the API separated for them for a reason, keeping them separated for our wrappers is safer in case things change in the future.

Naming, as always!

Save this for last, last!

Does any of that not make sense?
I think starting with the code you have and adding some unit test cases for this would be the best place to start a PR.

from boxr.

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.