Skip to content

Example of REST API calls with Combine Framework and handling data with sink() method

Notifications You must be signed in to change notification settings

marekhac/CombineRestApiSinkExample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

CombineRestApiSinkExample

Example of REST API calls with Combine Framework and handling data with sink() method

In my example I used a great free JSON API called Bored :). You can get a suggestion with random activity by calling the following endpoint:

https://www.boredapi.com/api/activity

It will returns you a JSON like:

{
  "accessibility": 0,
  "activity": "Compliment someone",
  "key": "9149470",
  "link": "",
  "participants": 2,
  "price": 0,
  "type": "social"
}

I used Combine to make a request and handle received data (and possible errors too). Run the app and look at the console for your daily activity :)

About

Example of REST API calls with Combine Framework and handling data with sink() method

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages