Giter Site home page Giter Site logo

fedena-sdk-ruby's Introduction

FedenaSdk

Ruby wrapper for fedena api

Installation

Add this line to your application's Gemfile:

gem 'fedena_sdk'

And then execute:

$ bundle

Or install it yourself as:

$ gem install fedena_sdk

Usage

Initialize sdk

client = FedenaSdk.authenticate do |config| 
  config.client_id = "<client_id>" 
  config.client_secret =  "<client_secret>"
  config.uri = '<fedena_instance_uri>'
  config.redirect_uri =  "<app_redirect_uri>"
end 

Generate access token

Using username and password

FedenaSdk.access_token_from_password('username','password','redirect_uri');
Using authcode
  • Get authorise url
client.auth_code.authorize_url(:redirect_uri => '')
  • Get auth code from url

  • Generate token

token = client.auth_code.get_token(auth_code,{:redirect_uri => ''},:header_format=>"Token token=\"%s\"")

News

  • Get all News
FedenaSdk::News.all

User

  • Get user details
FedenaSdk::User.find('username')

School

  • Get current school details
FedenaSdk::School.current_school

Attendance

  • Get attendance status of a student
FedenaSdk::Attendance.show(admission_no,date=>'10-12-2014')
  • Search in attendance entries
FedenaSdk::Attendance.search(query)
  • Marking attendance
attendance = FedenaSdk::Attendance.new(student_admission_no: "", forenoon: "", afternoon: "", date: "", batch_name: "", reason: "")
attendance.save
  • Deleting attendance object
attendance.destroy
  • Deleting attendance entry by admission_no and date
FedenaSdk::Attendance.destroy(admission_no,date)
  • Editing an attendance entry

attendance.update_attributes(reason: "new reason")

Course

  • Get all courses
FedenaSdk::Course.all

Batch

  • Search for batches
FedenaSdk::Batch.search(query)

Student

  • Search for students
FedenaSdk::Student.search(admission_no_like: "123")
  • Find student by admission_no
FedenaSdk::Student.find(<admission_no>)
  • Set profile photo for a student
FedenaSdk::Student.new.upload_photo("<admission_no>",photo)

BiometricInformation

  • Get biometric information
FedenaSdk::BiometricInformation.find(<biometric_id>)

EmployeeAttendance

Employee

  • Search for employees
FedenaSdk::Employee.search("<query>")

EmployeeCategory

EmployeeDepartment

  • Get all employee departments
FedenaSdk::EmployeeDepartment.all

EmployeeGrade

EmployeeLeaveType

  • Get all leave types
FedenaSdk::EmployeeLeaveType.all

EmployeePosition

  • Get all employe postions
 FedenaSdk::EmployeePosition.all

Event

ExamGroup

  • Search for exam groups
FedenaSdk::ExamGroup.search("<query>")

ExamScore

FinanceTransaction

  • Search for finance transaction
FedenaSdk::FinanceTransaction.search("<query>")

GradingLevel

Payroll

PayrollGroup

Reminder

StudentCategory

  • Get all student categories
FedenaSdk::StudentCategory.all

Subject

Timetable

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/tachyons/fedena-sdk-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

fedena-sdk-ruby's People

Contributors

tachyons avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

nidhindamodaran

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.