Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
idgetProjectTopology
Card
labelObjectiveC
Code Block
borderColorGreen
langjava
titleJSON
//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
            }

        }
Card
labelC#


Anchor
getProjectDisciplines
getProjectDisciplines

Get project disciplines

Deck of Cards
idgetProjectDisciplines
Card
labelObjectiveC
Code Block
borderColorGreen
langjava
titleJSON

//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
            }
            
        }
Card
labelC#