Project

fedena_sdk

0.0
No commit activity in last 3 years
No release in over 3 years
Fedena sdk
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.12
>= 0
~> 10.0
~> 3.0

Runtime

 Project Readme

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.