<commit_before>//
//  TwitterHelper.h
//  Presence
//

#import <Foundation/Foundation.h>

// More methods will be added to this file as the Presence assignments progress.
// We've left it up to you to figure out how to use the return values.
// Try inspecting the dictionary and array contents using NSLog or the debugger.
// Read about Twitter's API at http://apiwiki.twitter.com/
// Read about json-framework at http://code.google.com/p/json-framework

// Define USE_TEST_SERVER as 1 to avoid rate-limiting while developing.
// Define it as 0 (or comment it out) to use real live data from Twitter.
// Read more at http://apiwiki.twitter.com/Rate-limiting
#define USE_TEST_SERVER 0

@interface TwitterHelper : NSObject 
{
	
}

// Returns a dictionary with info about the given username.
// This method is synchronous (it will block the calling thread).
+ (NSDictionary *)fetchInfoForUsername:(NSString *)username;

// Returns an array of status updates for the given username.
// This method is synchronous (it will block the calling thread).
+ (NSArray *)fetchTimelineForUsername:(NSString *)username;

// Returns the array of user id's representing the users that the given user is following
+(id)fetchFollowingIdsForUsername:(NSString *)username;

// Returns an array that contains the individual status updates from a timeline
// This method is synchronous (it will block the calling thread).
+(NSArray *)parseStatusUpdatesFromTimeline:(NSArray *)userTimeline;

// Returns a dictionary with info about the given username.
// This method is synchronous (it will block the calling thread).<commit_msg>change return value of fetchFollowingIdsForUsername to NSArray<commit_after>//
//  TwitterHelper.h
//  Presence
//

#import <Foundation/Foundation.h>

// More methods will be added to this file as the Presence assignments progress.
// We've left it up to you to figure out how to use the return values.
// Try inspecting the dictionary and array contents using NSLog or the debugger.
// Read about Twitter's API at http://apiwiki.twitter.com/
// Read about json-framework at http://code.google.com/p/json-framework

// Define USE_TEST_SERVER as 1 to avoid rate-limiting while developing.
// Define it as 0 (or comment it out) to use real live data from Twitter.
// Read more at http://apiwiki.twitter.com/Rate-limiting
#define USE_TEST_SERVER 0

@interface TwitterHelper : NSObject 
{
	
}

// Returns a dictionary with info about the given username.
// This method is synchronous (it will block the calling thread).
+ (NSDictionary *)fetchInfoForUsername:(NSString *)username;

// Returns an array of status updates for the given username.
// This method is synchronous (it will block the calling thread).
+ (NSArray *)fetchTimelineForUsername:(NSString *)username;

// Returns the array of user id's representing the users that the given user is following
+(NSArray *)fetchFollowingIdsForUsername:(NSString *)username;

// Returns an array that contains the individual status updates from a timeline
// This method is synchronous (it will block the calling thread).
+(NSArray *)parseStatusUpdatesFromTimeline:(NSArray *)userTimeline;

// Returns a dictionary with info about the given username.
// This method is synchronous (it will block the calling thread).
{'fraction_non_alphanumeric': 0.08542559706062462, 'fraction_numerical': 0.001837109614206981, 'mean_word_length': 4.185714285714286, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '884934', 'n_tokens_mistral': 864, 'n_tokens_neox': 818, 'n_words': 398}