arthurgivigir / top-reddits

This is a code challenge

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Top Reddits

iOS Code Challenge

The goal is to implement a basic Top Reddits reader, with the features mentioned below. The API to get the all required Reddits data is specified below as well.

Required Features

  • List Top Reddits with thumbnails ✅

  • Pull to refresh Reddits ✅

  • Load more Reddits when reaching end of list ✅

Nice to have

  • Support for different device resolutions and orientation ❌

  • Display Reddit details (only for reddits with images in PNG and JPG format) ✅

  • Save Reddit image into photo library ✅

Reddit API: https://www.reddit.com/top.json


Important Informations:

  • XCode 14.1
  • iOS 16.1.1
  • MacOS Ventura 13.0
  • Architecture: MVVM

What I've done?

  • I've implemented all the required features and two nice to have.
  • I've implemented some few testes to show how can I test a Mocked API and the transfomation between a model and an entity. The best scenario is implement all functionalities, but I was afraid to not delivery at time this challenge.
    • This test helped me to implement the service and to map the most needed elements from json.
  • The images have been loaded and saved inside a local cache. I dind't implement a loading at the images, but I could complete the basic scenario.
  • The details page can show a image and a link, if the user clicks on it, Safari will be opened loading the content.
  • The details page can save the image if the user clicks on save button. This coverages only the success scenario.

About

This is a code challenge


Languages

Language:Swift 100.0%