I try to make an iOS application and use Github API with SDWebImage. Here is the code to get "User Profile Image".
[manager GET:@"https://api.github.com/users/(here is your account name)/following?page=1&per_page=100"
parameters:nil
success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSArray *array = [NSJSONSerialization JSONObjectWithData:responseObject
options:NSJSONReadingAllowFragments
error:nil];
for (NSDictionary *dic in array) {
[profileImageArray addObject:[dic valueForKey:@"avatar_url"]];
}
}failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Error: %@", error);
}];
this works well.
However, when I try to get Contribution heatmap images, I can't get images of Contribution heatmaps, because contribution heat maps are "SVG String".
Contribution heatmap is Here.
https://qiita-image-store.s3.amazonaws.com/0/19462/43207385-f3e4-1c96-b288-78802beee357.png
Then, after researching, I tried "SVGKit", "PocketSVG", "SKUBezierPath+SVG", and so on. But such libraries not works well for SVG "String" but SVG "files".
I can get a contribution heatmap SVG by using this URL
https://github.com/users/(here is username)/contributions
Here is that result.
http://i.imgur.com/pqy1FmO.png
I can't treat this response as UIImage. I also tried to change responseData to NSData and convert UIImage, but it also doesn't work well.
Could you teach me how to treat "github contribution heatmap's SVG" as UIImage?