Skip to content

Instantly share code, notes, and snippets.

@Gargo
Created June 16, 2011 05:31
Show Gist options
  • Save Gargo/1028721 to your computer and use it in GitHub Desktop.
Save Gargo/1028721 to your computer and use it in GitHub Desktop.
//
// EBVKAPI.h
// anyMusicAnywhere
//
// Created by Eric_Bro on 28.02.11.
// Copyright 2011 DevStudio. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "JSONKit.h"
#import "EBStringAddictions.h"
#define sAPI_ID @"100500" // измените на ID своего приложения
/* - - - - - - - - - -
* Получаем параметры сессии путем передачи Email'a и пароля
* - - - - - - - - - -
*/
NSDictionary* dictionaryWithSessionParametersFromVKAPI(NSString* email,
NSString* password);
/* - - - - - - - - - -
* Получаем объект (словарь) с результатами выполнения запроса
* - - - - - - - - - -
*/
NSDictionary* executeAPIMethod(NSString* nameOfMethod,
NSMutableDictionary* parametersOfMethod,
NSString* formatOfAnswer,
NSDictionary* sessionVar);
/* ---------------------
* Getting a string between 2 string ('first' & 'second') in 'main' string.
* ---------------------
* Example of usage:
*
* NSString *main = @"My name is <!Eric_Bro++";
* NSString *name = getStringBetweenStrings(@"<!",@"++",main);
*
* {name = "Eric_Bro"}
*---------------------
*/
NSString* getStringBetweenStrings(NSString *first,NSString*second,NSString*main);
/* ---------------------
* Getting a MD5 hash summ of string
* ---------------------
* Example of usage:
*
* NSString *source = @"Hash cracker";
* NSString *hash = md5HexDigest(source);
*
* {hash = "2da09b05ab76d8f99c409066282330e4"}
*---------------------
*/
NSString* MD5(NSString*input);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment