Latest 0.0.2
Homepage https://github.com/grokify/glip-sdk-swift
License MIT
Platforms ios 8.0, osx 10.9, requires ARC
Frameworks Foundation
Authors

GlipKit SDK for iOS / OS X in Swift

Version
Build Status
Coverage Status
Platform
Docs
License

GlipKit is a SDK to make integration with Glip (https://glip.com/) easier. It supports only incoming communications (from you to Glip).

Requirements

  • iOS 8.0+
  • Xcode 7.0+
  • Swift 2.0+

Installation

CocoaPods

  1. Install CocoaPods (if necessary)

    $ sudo gem install cocoapods
  2. Initialize CocoaPods

    $ cd /path/to/MyApp
    $ pod init
  3. Edit Podfile

    platform :ios, '8.0'
    use_frameworks!
    
    target 'MyApp' do
      pod 'GlipKit'
    
      # If using GitHub master branch:
      # pod 'GlipKit', git: 'https://github.com/grokify/glip-sdk-swift.git'
    end
  4. Install GlipKit

    $ pod install
  5. Start coding

    Open MyApp.xcworkspace in Xcode to begin coding with the following:

    import  GlipKit

Glip setup

This gem uses an incoming webhook integration on Glip. To create a new Glip webhook integration, in Glip.com, click on "Integrations" in the left column and then select the "Glip Webhooks" integration. After you select a conversation, a webhook URL will be presented which you will use with this gem to post messages to. The URL looks like the following:

https://hooks.glip.com/webhook/11112222-3333-4444-5555-666677778888

Usage

Initialize your poster and then call the send_message method to send your message. You must supply the webhook URL or webhook ID configured in the desired "Glip Webhooks" integration.

let glip = Poster(webhookURLOrID: "YOUR_WEBHOOK_URL_OR_ID")
glip.sendMessage("Hi there!")

You can send text in Markdown:

glip.sendMessage("* Location: [The Funky Buddha Lounge](http://www.thefunkybuddha.com)n*Beer Advocate Rating: [99](http://tinyurl.com/psf4uzq)")

You can use an options array if you don’t want to use the default settings.

glip.sendMessage("Hi there!", icon: "http://example.com/icon.png", activity: "Activity Alert", title: "A New Incoming Message Has Been Received")

You can preset your options:

glip = Poster(YOUR_WEBHOOK_URL, icon: "http://example.com/icon.png")
glip.sendMessage("Hi there!")

Supported Swift / Xcode Versions

This library supports the following Xcode / Swift implementations:

  1. Xcode 7.2.1 / Swift 2.1.1

Releases

Releases with release notes are availabe on GitHub releases. Release notes include a high level description of the release as well as lists of non-breaking and breaking changes.

Change Log

See CHANGELOG.md

Links

Project Repo

Glip

Contributing

  1. Fork it ( http://github.com/grokify/glip-sdk-swift/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Latest podspec

{
    "name": "GlipKit",
    "version": "0.0.2",
    "summary": "A Glip client library for iOS and OS X written in Swift",
    "homepage": "https://github.com/grokify/glip-sdk-swift",
    "license": "MIT",
    "authors": {
        "John Wang": "[email protected]"
    },
    "source": {
        "git": "https://github.com/grokify/glip-sdk-swift.git",
        "tag": "0.0.2"
    },
    "social_media_url": "https://twitter.com/grokify",
    "platforms": {
        "ios": "8.0",
        "osx": "10.9"
    },
    "requires_arc": true,
    "source_files": "GlipKit/Sources/*.swift",
    "frameworks": "Foundation"
}

Pin It on Pinterest

Share This