Giter Club home page Giter Club logo

kele-gem's Introduction

Kele

A Ruby Gem API client that allows authorized users to access the Bloc API. Students can get their user and enrollment info, check their mentor’s availability, see their course roadmaps, and even submit their assignments through the command line. This gem also offers the ability to read, send, and receive messages. All data is parsed and neatly formatted into JSON for easy readability.

Bloc API documentation

To see how the usage examples below work with the Bloc API, be sure to checkout the full Bloc API documentation.

Getting started

  • Add gem kele into your application's Gemfile and then run bundle
  • or run gem install kele from your command line.

Usage examples

Run irb and require the gem in your lib:

$ irb
>> require './lib/kele'
=> true
>> kele_client = Kele.new("[email protected]", "abc123")

Retreive current user.

>> kele_client.get_me

List mentor's available timeslots for the current user.

>> kele_client.get_me
>> mentor_id = kele_client.user_data["current_enrollment"]["mentor_id"]
>> kele_client.get_mentor_availability(mentor_id)

Show a roadmap and associated sections and checkpoints.

>> kele_client.get_me
>> roadmap_id = kele_client.user_data["current_enrollment"]["roadmap_id"]
>> kele_client.get_roadmap(roadmap_id)
>> checkpoint_id = # you can find an individual checkpoint id from the get_roadmap data
>> kele_client.get_checkpoint(checkpoint_id)

Show message threads for current user, paginated.

>> kele_client.get_messages # returns all message threads
>> kele_client.get_messages(1) # returns the first page of message threads (there are 10 threads per page)

Create a new message on an existing conversation thread, or a new conversation thread with a message. Messages without a token will create a new thread.

>> kele_client.create_message(user_id, recipient_id, token, subject, message)

Create a checkpoint assignment submission.

>> kele_client.create_submission(assignment_branch, assignment_commit_link, checkpoint_id, comment, enrollment_id)

kele-gem's People

Contributors

karakarakaraff avatar

Watchers

 avatar

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.