Latest 1.0.4
Homepage https://github.com/meekan/meekan-objectivec-sdk
License MIT Copyright (c) 2014 Meekan Solutions Ltd., Eyal Yavor

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Platforms ios 7.0, requires ARC
Dependencies AFNetworking
Authors

Meekan is a platform that helps people schedule meetings.

Our API can help developers integrate calendar event creation and modification, availability lookups, and time suggestions.

How To Get Started

  • Request an API key – email us at [email protected], telling us a bit about yourself and what you will build.
  • Check out the playground for a look at our available APIs, and a comprehensive getting started guide.
  • Install the SDK

Installation with CocoaPods

CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries.

Podfile

platform :ios, '7.0'
pod 'MeekanSDK', '~> 1.0'

Usage

Initialize a shared MeekanSDK instance using your API Key

MeekanSDK *sdk =[MeekanSDK sharedInstanceWithApiKey:@"YOUR_API_KEY_HERE"];

Login

You must be logged in as a Meekan User to perform operations on the backend.

There are 2 options exposed for now to login – via Google OAuth2, or directly to an exchange account.

Once connected, you get an object describing your user and accounts. More than one account can be connected to the current user, but using the "connect" method again.

Google Login

MKNGoogleLoginViewController *viewController = [sdk connectWithGoogleWithCompletionHandler:^(MKNGoogleLoginViewController *vc, ConnectedUser *user, NSError *error) {
  if (user) {
    // Save current user and accounts
    NSLog(@"User primary Email: %@", user.primaryEmail);
    } else {
      //
    }
  }];
[self.navigationController pushViewController:viewController animated:YES];

Exchange Login

[self.sdk connectWithExchangeUser:accountParams[@"username"] withPassword:accountParams[@"password"] withEmail:accountParams[@"email"] withServerUrl:accountParams[@"url"] andDomain:accountParams[@"domain"] onSuccess:^(ConnectedUser *user) {
    // Save connected user account details.
  } onError:^(NSError *err) {
    // Handle bad authentication details, retry
  }];

Suggested Times for a meeting

Availability lookup allows you to find suggested times for a meeting using Meekan’s schedueling engine. You use it by providing time frames for the meeting, as well as account IDs of participants. The operations returns ranked time slots based on availability.

SlotSuggestionsRequest *request = [[SlotSuggestionsRequest alloc]init];
request.organizerAccountId = @"YOUR_ACCOUNT_ID";
request.duration = 45; // Minutes
NSDate *now = [NSDate dateWithTimeIntervalSince1970:trunc([[NSDate date] timeIntervalSince1970])];
NSDate *inTwoHours = [now dateByAddingTimeInterval:120 * 60];
NSDate *inThreeHours = [now dateByAddingTimeInterval:180 * 60];
NSDate *inFourHours = [now dateByAddingTimeInterval:240 * 60];
request.timeFrameRanges = @[ @[now, inTwoHours],
                             @[inThreeHours, inFourHours];
[self.sdk suggestedSlots:request onSuccess:^(NSArray *slotSuggestions) {
  for (SlotSuggestion *suggestion in slotSuggestions) {
    NSLog(@"Start: %@, Unavailable: %@", suggestion.start, suggestion.busyIds);
  }
  NSSet *times = [NSSet setWithArray:[slotSuggestions valueForKey:@"start"]];
  } onError:^(NSError *err) {
    NSLog(@"Oops: %@", err);
}];

Meeting Creation

The MeetingDetails instance contains information about the meeting to create.

  • A meeting with no options is considered a draft meeting.
  • A meeting with a single options will be created on calendar account, and invitations will be sent to invitees from the calendar provider.
  • A meeting with multiple options will create a poll for preferred times among the invitees. It will also book the optional times in your calendar account.
MeetingDetails *details = [[MeetingDetails alloc]init];
details.accountId = @"4785074604081152";
details.title = @"Test Multiple";
details.durationInMinutes = 10;
NSDate *start = [NSDate dateWithTimeIntervalSince1970:1409477400];
NSSet *options = [NSSet setWithObjects:
  [start dateByAddingTimeInterval:3600],
  [start dateByAddingTimeInterval:7200],
  [start dateByAddingTimeInterval:10800], nil];
details.options = options;
details.participants = [[MeetingParticipants alloc]init];

[self.sdk createMeeting:details onSuccess:^(MeetingServerResponse *details) {
    NSLog(@"Created Meeting with ID: %@"details.meetingId);
  } onError:^(NSError *err) {
    // Handle error    
}];

More

MeekanSDK class contains all wrapped methods for now. Take a look at the exposed operations.

Communication

We’d love to hear your feedback. Send us issues or a pull request here, or contact us via email on [email protected].

Latest podspec

{
    "name": "MeekanSDK",
    "version": "1.0.4",
    "summary": "Wrapper for Meekan's REST API - Schedule meetings easily.",
    "description": "tMeekan is a cross-vendor meeting scheduling platform.ntntIt allows users to schedule meetings with other participants using its uniquentscheduling engine.ntSharing availabilities across organizations, handling multiple identities andntcalendar providers, and finding the best time for a meeting.t n",
    "homepage": "https://github.com/meekan/meekan-objectivec-sdk",
    "license": {
        "type": "MIT",
        "text": "Copyright (c) 2014 Meekan Solutions Ltd., Eyal YavornnPermission is hereby granted, free of charge, to any person obtaining a copynof this software and associated documentation files (the "Software"), to dealnin the Software without restriction, including without limitation the rightsnto use, copy, modify, merge, publish, distribute, sublicense, and/or sellncopies of the Software, and to permit persons to whom the Software isnfurnished to do so, subject to the following conditions:nnThe above copyright notice and this permission notice shall be included innall copies or substantial portions of the Software.nnTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORnIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEnAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERnLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS INnTHE SOFTWARE.n"
    },
    "authors": {
        "Eyal Yavor": "[email protected]"
    },
    "platforms": {
        "ios": "7.0"
    },
    "source": {
        "git": "https://github.com/meekan/meekan-objectivec-sdk.git",
        "tag": "1.0.4"
    },
    "source_files": [
        "MeekanSDK",
        "MeekanSDK/**/*.{h,m}"
    ],
    "exclude_files": "Classes/Exclude",
    "requires_arc": true,
    "dependencies": {
        "AFNetworking": [
            "~> 2.3"
        ]
    }
}

Pin It on Pinterest

Share This