‫Hello, my friends, and welcome back.
‫In this video, we will start connecting our applications with the Internet, the APIs, the Web services
‫and so on.
‫So we're going to learn how to send data, receive data, how to parse Json files and so on.
‫So I will define some terms I want from you to focus with me and take notes.
‫The Web services apps need web services to get data, upload data authentication, store images, upload
‫files, and much more use cases.
‫Web services usually has a rest API for the communication.
‫The rest API provides different URLs to get data.
‫Then from the app, we need to make an Http request to an URL at Http request will also contain headers
‫and other data for path and query parameters.
‫After receiving our request, the API sends back a response object to our application.
‫This response object contains a response code info about success or failure of the request.
‫Don't worry, we will talk about this in deep in the next lessons.
‫But I want from you to understand that a desktop PC API, the mobiles and any other platform will be
‫connected with the API.
‫This API will send API request to the server and the data source and this in turn will be sending an
‫API response to the API.
‫And this API will be sending the data back to the desktop.
‫The mobile and the other platforms in form of Json, XML, http response and in other formats.
‫So what is API?
‫API stands for application programming interface.
‫This interface allows people to further build upon another application's functionality and data.
‫One might understand the APIs as building blocks you can use to make almost anything.
‫As they can be found in everything from Spotify to Yahoo Finance and other features.
‫Jace.
‫The received data will be in Json format and the application needs to parse those Json formatted data
‫to Java or Kotlin and display them to the user.
‫Json stands for JavaScript object notation.
‫Json is a lightweight format for storing and responding data.
‫Json is often used when data is sent from the server to a web page.
‫Json is a self-describing and easy to understand.
‫You can see that if you are a client and sending a request to the server.
‫The response would be in terms of Json.
‫Don't worry if you if you see this, this as a complex stuff and things don't worry, we're going to
‫deep dive into Json format and syntax in the next lesson.
‫So I want from you to understand step by step why we are using things.
‫You send the data by the application, you receive it back by the API to the application in the Json
‫format.
‫And this is our target.
‫I want from you to focus with me now on this and this topic.
‫When you send the your application, send parameters and the request to the retrofit.
‫Retrofit will send the Uri and Http method to the server and the request will be transformed into a
‫response.
‫So this response from the server is in Json format.
‫And then this Json format is a transformed by the retrofit into Kotlin objects.
‫So what is retrofit?
‫The library provides a powerful framework for authentication and interacting with APIs and sending network
‫requests with Http request.
‫Naturally serialize the Json reaction utilizing a Pojo.
‫Plain old Java object which must be characterized in cutting edge for the Json structure.
‫This library the retrofit makes downloading Json or XML data from a web API fairly straightforward.
‫Once the data is downloaded, then it is parsed into plain object.
‫The old Java object Pojo, which must be defined for each resource in the response.
‫And this is our mission.
‫This is our target to transform the Json format.
‫The response from the server to objects and display them into our application.
‫I want from you to focus on this part and don't worry, don't be frustrated and don't don't be seeing
‫stuffs like a complex and I don't understand anything.
‫Don't worry, we'll go step by step.
‫In adding and mastering the retrofit, the Json parsing and display data from the server.