As an online customer
I want the app to automatically load my latest image feed
So I can always enjoy the newest images of my friends
Given the customer has connectivity
When the customer requests to see their feed
Then the app should display the latest feed from remote
And replace the cache with the new feed
As an offline customer
I want the app to show the latest saved version of my image feed
So I can always enjoy images of my friends
Given the customer doesn't have connectivity
And there’s a cached version of the feed
And the cache is less than seven days old
When the customer requests to see the feed
Then the app should display the latest feed saved
Given the customer doesn't have connectivity
And there’s a cached version of the feed
And the cache is seven days old or more
When the customer requests to see the feed
Then the app should display an error message
Given the customer doesn't have connectivity
And the cache is empty
When the customer requests to see the feed
Then the app should display an error message
- URL
- Execute "Load Image Feed" command with above data.
- System downloads data from the URL.
- System validates downloaded data.
- System creates image feed from valid data.
- System delivers image feed.
- System delivers invalid data error.
- System delivers connectivity error.
- Execute "Load Image Feed" command with above data.
- System fetches feed data from cache.
- System validates cache is less than seven days old.
- System creates image feed from cached data.
- System delivers image feed.
- System delivers error.
- System delivers no feed images.
- System delivers no feed images.
- Execute "Validate Cache" command with above data.
- System retrieves feed data from cache.
- System validates cache is less than seven days old.
- System deletes cache.
- System deletes cache.
- Image Feed
- Execute "Save Image Feed" command with above data.
- System deletes old cache data.
- System encodes image feed.
- System timestamps the new cache.
- System saves new cache data.
- System delivers success message.
- System delivers error.
- System delivers error.
Property | Type |
---|---|
id |
UUID |
description |
String (optional) |
location |
String (optional) |
url |
URL |
GET *url* (TBD)
200 RESPONSE
{
"items": [
{
"id": "a UUID",
"description": "a description",
"location": "a location",
"image": "https://a-image.url",
},
{
"id": "another UUID",
"description": "another description",
"image": "https://another-image.url"
},
{
"id": "even another UUID",
"location": "even another location",
"image": "https://even-another-image.url"
},
{
"id": "yet another UUID",
"image": "https://yet-another-image.url"
}
...
]
}
As an online customer
I want the app to automatically load my latest image feed
So I can always enjoy the newest images of my friends
Given the customer has connectivity
When the customer requests to see their feed
Then the app should display the latest feed from remote
And replace the cache with the new feed
As an offline customer
I want the app to show the latest saved version of my image feed
So I can always enjoy images of my friends
Given the customer doesn't have connectivity
And there’s a cached version of the feed
And the cache is less than seven days old
When the customer requests to see the feed
Then the app should display the latest feed saved
Given the customer doesn't have connectivity
And there’s a cached version of the feed
And the cache is seven days old or more
When the customer requests to see the feed
Then the app should display an error message
Given the customer doesn't have connectivity
And the cache is empty
When the customer requests to see the feed
Then the app should display an error message
- URL
- Execute "Load Image Feed" command with above data.
- System downloads data from the URL.
- System validates downloaded data.
- System creates image feed from valid data.
- System delivers image feed.
- System delivers invalid data error.
- System delivers connectivity error.
- URL
- Execute "Load Image Data" command with above data.
- System downloads data from the URL.
- System validates downloaded data.
- System delivers image data.
- System does not deliver image data nor error.
- System delivers invalid data error.
- System delivers connectivity error.
- Execute "Load Image Feed" command with above data.
- System retrieves feed data from cache.
- System validates cache is less than seven days old.
- System creates image feed from cached data.
- System delivers image feed.
- System delivers error.
- System delivers no feed images.
- System delivers no feed images.
- URL
- Execute "Load Image Data" command with above data.
- System retrieves data from the cache.
- System delivers cached image data.
- System does not deliver image data nor error.
- System delivers error.
- System delivers not found error.
As an online customer
I want the app to load image commments
So I can see how people are engaging with images in my feed
Given the customer has connectivity
When the customer requests to see comments on an image
Then the app should display all comments for that image
Given the customer doesn't have connectivity
When the customer requests to see comments on an image
Then the app should display an error message
- ImageID
- Execute "Load Image Comments" command with above data.
- System loads data from remote service.
- System validates data.
- System creates comments from valid data.
- System delivers comments.
- System delivers invalid data error.
- System delivers connectivity error.
Property | Type |
---|---|
id |
UUID |
message |
String |
created_at |
Date (ISO8601 String) |
author |
CommentAuthorObject |
Property | Type |
---|---|
username |
String |
GET /image/{image-id}/comments
2xx RESPONSE
{
"items": [
{
"id": "a UUID",
"message": "a message",
"created_at": "2020-05-20T11:24:59+0000",
"author": {
"username": "a username"
}
},
{
"id": "another UUID",
"message": "another message",
"created_at": "2020-05-19T14:23:53+0000",
"author": {
"username": "another username"
}
},
...
]
}