Giter Site home page Giter Site logo

jivedotnetsdk's Introduction

JiveDotNetSDK

.Net SDK for working with Jive. This is a work in progress. Many Clients have still not been implemented.

See Blog Post Announcement for More Details

https://community.jivesoftware.com/community/developer/blog/2014/08/21/jive-net-sdk-on-github

Installation

To include JiveDotNetSDK in your .NET project, follow these steps.

  1. Clone the source to your project root directory.
  • If you have the git command line tools for Windows installed, simply navigate to your project root and run the command:
git clone https://github.com/jivesoftware/JiveDotNetSDK
  1. Build the JiveDotNetSDK project
  • Open the solution file in from the JiveDotNetSDK source.
  • Once the project is open in Visual Studio, change the build mode to "Release" and then click Build > Build Solution (F6) to build the project into a dll.
  1. Add a reference to the JiveDotNetSDK to your project.
  • Open the project in which you want to use JiveDotNetSDK.
  • In Visual Studio, right click "References" and "Add Reference".
  • In the Refenece Manager tool, click "Browse" and navigate to the folder where you cloned JiveDotNetSDK.
  • From there, select the file at Net.Pokeshot.JiveSdk\bin\Release\Net.Pokeshot.JiveSdk.dll.
  • Click "Ok" in the Reference Manager and the reference will be added to your project.
  1. Add using Net.Pokeshot.JiveSdk.<Auth>|<Clients>|<Models>|<Util> to the .cs files where you want to use the SDK.

Usage

The SDK is modeled closely after Jive's REST API v3.14.

Models

The Models in the SDK are simply the Types defined by the REST API Documentation implemented in C# classes.

Clients

The Clients in the SDK are a C# wrapper around the services defined by the REST API Documentation. To use a client, you must first instantiate one using your Jive instance URL and credentials. Then you can make Web requests to your instance using the Client's methods.

Examples

Here are some examples of using the JiveDotNetSDK to interface with your Jive instance.

Getting Users

using System.Collections.Generic;
using Net.Pokeshot.JiveSdk.Models;
using Net.Pokeshot.JiveSdk.Clients;
using System.Net;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string jiveUrl = "https://example.jiveon.com";
            var creds = new NetworkCredential("username", "password");

            PeopleClient p = new PeopleClient(jiveUrl, creds);

            // Gets a list of all the Users on your instance of Jive.
            List<Person> people = p.GetPeople();
        }
    }
}

Printing the names of the recent Authors

using System.Collections.Generic;
using Net.Pokeshot.JiveSdk.Models;
using Net.Pokeshot.JiveSdk.Clients;
using System.Net;
using System;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string jiveUrl = "https://example.jiveon.com";
            var creds = new NetworkCredential("username", "password");

            ContentsClient c = new ContentsClient(jiveUrl, creds);

            // Get all Content created in the last day.
            List<GenericContent> content = c.GetContents(new Tuple<DateTime, DateTime>(DateTime.Now.AddDays(-1), DateTime.Now), null, int.MaxValue);

            foreach (var item in content)
            {
                Console.WriteLine(item.author.displayName);
            }
        }
    }
}

jivedotnetsdk's People

Contributors

bsergent avatar cnorick avatar

Watchers

 avatar  avatar  avatar  avatar  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.