No release in over a year
Simple wrapper for the FreshService API v2
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2.2.10
~> 3.14.0

Runtime

>= 0.17.0
 Project Readme

FreshService API Client

Ruby toolkit for the Fresh Service API V2.

Table of Contents

  1. Installation
  2. API Documentation
  3. Making requests
    1. Initialization
    2. Ticket
    3. Group
    4. Service Request
  4. License

Installation

Add this line to your application's Gemfile:

gem 'fresh_service_api_v2_client', '~> 1.0.2'

And then execute:

bundle install

Or install it yourself as:

gem install fresh_service_api_v2_client

Access the library in Ruby:

require 'fresh_service_api_v2_client'

API Documentation

https://api.freshservice.com/

Making requests

Initialization

# client initialization

ENV["FRESH_SERVICE_API_KEY"] = ''
ENV["FRESH_SERVICE_ORG"] = ''
client = FreshService::Client.new

OR

client = FreshService::Client.new(organisation: 'abc', api_key: 'api_key')

OR

client = FreshService::Client.configure do |c|
            c.organisation = 'abc'
            c.api_key = 'api_key'
         end

Ticket

# Create a ticket
# @see https://api.freshservice.com/#create_ticket
client.create_ticket(options = {})

# Update a ticket
# @see https://api.freshservice.com/#update_ticket_priority
client.update_ticket(ticket_id, options = {})

# View a ticket
# @see https://api.freshservice.com/#view_a_ticket
client.view_ticket(ticket_id, options = {})

Group

# Create a group
# @see https://api.freshservice.com/#create_a_group
client.create_group(options = {})

# View a group
# @see https://api.freshservice.com/#view_a_group
client.view_group(group_id, options = {})

Service Request

# Create a Service Request
# @see https://api.freshservice.com/#create_service_request
client.create_service_request(display_id, options = {})

# Update a Service Request
# @see https://api.freshservice.com/#update_req_items_of_sr
client.update_service_request(ticket_id, item_id, options = {})

License

MIT