Project

jive_api

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

Development

>= 0

Runtime

>= 2.1.0
>= 0.10.0
 Project Readme

Build Status

jive-ruby

A Ruby Interface to the Jive REST API (https://developers.jivesoftware.com/api/rest).

Apologies, but the documentation is low down on my list of priorities for the project I am working on at the moment. This code is messy and could do with some refactoring. There are bugs and it's a work in progress.

Simple Example:

    require 'jive_api'
    j = Jive::Api '<username>', '<password>', '<uri of your jive server>'
    me = j.person_by_username '<username>'
    puts me.display_name

Usage


Jive::API instances have methods that can query Jive for various types of objects. Jive::API handles the work of pagination and marshaling the responses into Ruby objects.

Examples:

Spaces

spaces = j.spaces
spaces.class
=> Array
spaces.first.class
=> Jive::Space
space = spaces.first
space.name
=> "My Cool Space"
space.id
=> 1023

Space Contents

contents = space.contents
contents.class
=> Array
doc = contents.first
doc.class
=> Jive::Document
doc.content_methods
=> [:get,
 :attachments,
 :has_attachments?,
 :author,
 :visibility,
 :updated_at,
 :content_id,
 :comments,
 :raw_data,
 :uri,
 :type,
 :parent,
 :id,
 :self_uri,
 :subject,
 :display_name,
 :html_uri,
 :display_path]
 doc.get
 => "<body>..."
 doc.type
 => "document"
 doc.subject
 => "Some cool document"

Caching

Jive::API instances can be created with different caching mechanisms. By default Jive::API will attempt to use Memcached running on localhost:11211. However, if you don't want to use Memcached you can create an instance using in-memory hashing:

j = Jive::Api.new("user","password","url", Jive::Cache::Hashcache)

Examples

There is some code in the /examples directory.

content-csv.rb

Creates a CSV file called output.csv with the author, type, update time, "path" (where in Jive the content is located) and name.

Run it with;

ruby ./content-csv.rb <username> <password> <url>

Where URL is http://servername