...
Authentication
Find out how many teams I am part of
Get team project list
Get project details
Get project topology
Get project disciplines
Upload project thumbnail
Create an issue in the project
Get the issue list from the project
Delete all the issues from the project
Create a new pin for the issue
Get all the pins of the issue
Create/Upload a new attachment for the issue
Get the attachment list from the issue
...
Deck of Cards |
---|
|
Card |
---|
| Code Block |
---|
borderColor | Green |
---|
lang | java |
---|
title | JSON |
---|
|
//build an info object and convert to json
NSError *requestError;
NSHTTPURLResponse *responseHTTP;
NSString* requestString = [[NSString alloc] initWithFormat:@"%@%@/projects/%@/topology",[CSS getDefaultAPIURL],[CSS getSlug], mProjectID];
NSMutableURLRequest *requestForProjectsTree = [[NSMutableURLRequest alloc] init];
[requestForProjectsTree setURL:[NSURL URLWithString:requestString]];
[requestString release];
[requestForProjectsTree setHTTPMethod:@"GET"];
[requestForProjectsTree setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[requestForProjectsTree setValue:[[CommunicationSingleton sharedSingleton] getAuthorization] forHTTPHeaderField:@"Authorization"];
NSData *response = [NSURLConnection sendSynchronousRequest:requestForProjectsTree returningResponse:&responseHTTP error:&requestError];
[requestForProjectsTree release];
NSString *path = [[proj getProjectFolderPath] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.topology", mProjectID]];
if ([responseHTTP statusCode] == 200)
{
// Save project topology locally.
[response writeToFile:path atomically:NO];
// Load project topology to memory.
[proj loadTopologyFromData:response];
} else {
// If Failed
// Check if we have the last used topology } else {for this project is available offline (rembember that this is could not be the last version)
if ([[NSFileManager defaultManager] fileExistsAtPath:path]) {
// Loading project topology offline
NSData* data = [NSData dataWithContentsOfFile:path];
[proj loadTopologyFromData:data];
} else {
// Download Failed + Local Storage not available
}
}
|
|
|
Anchor |
---|
| getProjectDisciplines |
---|
| getProjectDisciplines |
---|
|
Get project disciplines
Deck of Cards |
---|
|
Card |
---|
| Code Block |
---|
borderColor | Green |
---|
lang | java |
---|
title | JSON |
---|
|
//build an info object and convert to json
NSError *requestError;
NSHTTPURLResponse *responseHTTP;
NSString* requestString = [[NSString alloc] initWithFormat:@"%@%@/projects/%@/topology",[CSS getDefaultAPIURL],[CSS getSlug], mProjectID];
NSMutableURLRequest *requestForProjectsTree = [[NSMutableURLRequest alloc] init];
[requestForProjectsTree setURL:[NSURL URLWithString:requestString]];
[requestString release];
[requestForProjectsTree setHTTPMethod:@"GET"];
[requestForProjectsTree setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
[requestForProjectsTree setValue:[[CommunicationSingleton sharedSingleton] getAuthorization] forHTTPHeaderField:@"Authorization"];
NSData *response = [NSURLConnection sendSynchronousRequest:requestForProjectsTree returningResponse:&responseHTTP error:&requestError];
[requestForProjectsTree release];
NSString *path = [[proj getProjectFolderPath] stringByAppendingPathComponent:[NSString stringWithFormat:@"%@.topology", mProjectID]];
if ([responseHTTP statusCode] == 200)
{
// Save project topology locally.
[response writeToFile:path atomically:NO];
// Load project topology to memory.
[proj loadTopologyFromData:response];
} else {
// If Failed
// Check if we have the last used topology for this project is available offline (rembember that this is could not be the last version)
if ([[NSFileManager defaultManager] fileExistsAtPath:path]) {
// Loading project topology offline
NSData* data = [NSData dataWithContentsOfFile:path];
[proj loadTopologyFromData:data];
} else {
// Download Failed + Local Storage not available
}
}
|
|
|