Giter Site home page Giter Site logo

calendlyr's Introduction

Hi there 👋 I'm araluce

Senior RoR developer

  • 🌍 I'm based in Sevilla (Spain)
  • ✉️ You can contact me at [email protected]
  • 🚀 I'm currently working as RoR developer at Crisalix

Skills

Ruby JavaScript HTML5 MySQL PostgreSQL MacOS

calendlyr's People

Contributors

araluce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

calendlyr's Issues

Caching me and organizations responses

Some methods like client.me and client.organization generates a response that probably don't change in the future. Maybe it's a good point caching those responses. Add a reload method for User model to fetch an updated response.

DRY handle_response method

@araluce If you are not planning to add something specific for each response code, this code can be much DRYer 👌🏼

def handle_response(response)
body = JSON.parse(response.read_body)
case response.code
when 400
raise Error, "#{body["title"]}. #{body["message"]}"
when 401
raise Error, "#{body["title"]}. #{body["message"]}"
when 403
raise Error, "#{body["title"]}. #{body["message"]}"
when 404
raise Error, "#{body["title"]}. #{body["message"]}"
when 429
raise Error, "#{body["title"]}. #{body["message"]}"
when 500
raise Error, "#{body["title"]}. #{body["message"]}"
when 503
raise Error, "#{body["title"]}. #{body["message"]}"
else
body
end
end

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.