<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Martins Oloyede</title>
    <description>The latest articles on DEV Community by Martins Oloyede (@devmayor15).</description>
    <link>https://dev.to/devmayor15</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F790138%2F77e01eeb-cb4f-4f4f-8329-884808a5728e.jpeg</url>
      <title>DEV Community: Martins Oloyede</title>
      <link>https://dev.to/devmayor15</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devmayor15"/>
    <language>en</language>
    <item>
      <title>The Beginner's Guide to Understanding an API: Part 2</title>
      <dc:creator>Martins Oloyede</dc:creator>
      <pubDate>Thu, 13 Jan 2022 23:07:32 +0000</pubDate>
      <link>https://dev.to/devmayor15/the-beginners-guide-to-understanding-an-api-part-2-2phn</link>
      <guid>https://dev.to/devmayor15/the-beginners-guide-to-understanding-an-api-part-2-2phn</guid>
      <description>&lt;p&gt;In the last article, we discussed what an API is, the engine behind an API, the benefits, types, what are endpoints and the major request methods we have. &lt;/p&gt;

&lt;p&gt;You can review it &lt;a href="https://dev.to/devmayor15/the-beginners-guide-to-understanding-an-api-52m3"&gt;here&lt;/a&gt; to have an idea on APIs.&lt;/p&gt;

&lt;p&gt;Now we can collect everything that we learned together and discuss more on API.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ENBROepw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ure8llplq2psy30ojcli.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ENBROepw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ure8llplq2psy30ojcli.png" alt="types of apis image" width="768" height="509"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Web Service APIs
&lt;/h2&gt;

&lt;p&gt;Before we discuss about what a web service API is, let's learn what what a web service is.&lt;/p&gt;

&lt;p&gt;The term Web service is either: a service offered by an electronic device to another electronic device, communicating with each other via the World Wide Web, or a server running on a computer device, listening for requests at a particular port over a network, serving web documents.&lt;/p&gt;

&lt;p&gt;Apart from the main web APIs, there are also web service APIs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Rest&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Soap&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;XML-RPC&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;JSON-RPC&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The following are the most common types of web service APIs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Rest(Representational State Transfer): REST is a set of architectural constraints, not a protocol or a standard like other web services. API developers can implement REST in a variety of ways.&lt;br&gt;
 When a client request is made via a RESTful API, it transfers &lt;br&gt;
 a representation of the state of the resource to the &lt;br&gt;
 requester or endpoint. &lt;br&gt;
 This information, or representation, is delivered in one of &lt;br&gt;
 several formats via HTTP: JSON (Javascript Object Notation), &lt;br&gt;
 HTML, XLT, Python, PHP, or plain text. JSON is the most &lt;br&gt;
 generally popular file format to use because, despite its &lt;br&gt;
 name, it’s language-agnostic, as well as readable by both &lt;br&gt;
 humans and machines. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Soap(Simple Object Access Protocol): This is a protocol that uses XML as a format to transfer data. Its main function is to define the structure of the messages and methods of communication.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Today, it's mostly used to expose web services and transmit data over HTTP/HTTPS.&lt;/p&gt;

&lt;p&gt;It also uses WSDL, or Web Services Definition Language, in a machine-readable document to publish a definition of its interface.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;XML-RPC: This is a protocol that uses a specific XML format to transfer data compared to SOAP that uses a proprietary XML format. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In XML-RPC, a client performs an RPC by sending an HTTP request to a server that implements XML-RPC and receives the HTTP response.&lt;/p&gt;

&lt;p&gt;It is also older than SOAP. XML-RPC uses minimum bandwidth and is much simpler than SOAP. Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;employees&amp;gt;
  &amp;lt;employee&amp;gt;
    &amp;lt;firstName&amp;gt;Martins&amp;lt;/firstName&amp;gt; &amp;lt;lastName&amp;gt;Oloyede&amp;lt;/lastName&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;JSON-RPC: JSON-RPC is a remote procedure call protocol encoded in JSON. It is similar to the XML-RPC protocol, defining only a few data types and commands.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;JSON-RPC allows for notifications (data sent to the server that does not require a response) and for multiple calls to be sent to the server which may be answered asynchronously. Example&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{"employees":[
 { "firstName":"Martins", "lastName":"Oloyede" },
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Differences between Soap and Rest
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;u&gt;Soap:&lt;/u&gt; It is driven by Function.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Rest:&lt;/u&gt; It is driven by data.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;u&gt;Soap:&lt;/u&gt; Since SOAP is a protocol, it follows a strict &lt;br&gt;
standard to allow communication between the client and the &lt;br&gt;
server.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Rest:&lt;/u&gt; REST is an architectural style that doesn’t follow any strict standard.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;u&gt;Soap:&lt;/u&gt; It is difficult to implement and it requires more bandwidth.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Rest:&lt;/u&gt; It is easy to implement and requires less bandwidth such as smartphones.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Differences between JSON and XML
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;u&gt;Json:&lt;/u&gt; It is JavaScript Object Notation.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Xml:&lt;/u&gt; It is extensible Markup Language.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;u&gt;Json:&lt;/u&gt; Focuses mainly on Data.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Xml:&lt;/u&gt; Focuses mainly on Document.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;u&gt;Json:&lt;/u&gt; Supports only text and numbers.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Xml:&lt;/u&gt; Supports various types of data for example text, numbers, images, graphs, charts etc.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;u&gt;Json:&lt;/u&gt; It has low security.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;Xml:&lt;/u&gt; It has high security.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How to start using an API
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Get an API key&lt;/li&gt;
&lt;li&gt;Test API endpoints&lt;/li&gt;
&lt;li&gt;Create your app&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. Get an API key
&lt;/h2&gt;

&lt;p&gt;An application programming interface key is a unique identifier used to authenticate a user, developer, or calling program to an API. In order to get an API key, you need to somehow register with the API server and enter your identity data.&lt;/p&gt;

&lt;p&gt;This can be a username, email, and password; Google, Facebook, or Github account.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Test API endpoints
&lt;/h2&gt;

&lt;p&gt;After we receive the API key, we can refer to the API endpoints (according to the rules in the documentation) to check if everything works as we expected. For this, we can use a REST client like Postman.&lt;/p&gt;

&lt;p&gt;Here is a &lt;a href="https://www.youtube.com/watch?v=VywxIQ2ZXw4"&gt;video&lt;/a&gt; on freecodecamp that can teach you on how to test api endpoints on the Postman application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--u0i69W-h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ek2w8j8ovexofssmgde6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--u0i69W-h--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ek2w8j8ovexofssmgde6.png" alt="api endpoints img" width="880" height="392"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Create your app
&lt;/h2&gt;

&lt;p&gt;After we tested all endpoints and read through the API documentation and it worked as we expected, then we can start creating the application, including calls to the API.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;APIs are an integral part of the modern development ecosystem. Having spent a relatively short period of time studying them, you can use them to widely extend the capabilities of your own application.&lt;/p&gt;

&lt;p&gt;Thank you for reading this article. Watch out for the next one on - How to use an API in javascript.&lt;/p&gt;

&lt;p&gt;Reach out to me via:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Twitter: @devmayor_&lt;/li&gt;
&lt;li&gt;LinkedIn: Martins Oloyede.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>The Beginner's Guide to Understanding an API</title>
      <dc:creator>Martins Oloyede</dc:creator>
      <pubDate>Tue, 11 Jan 2022 23:04:03 +0000</pubDate>
      <link>https://dev.to/devmayor15/the-beginners-guide-to-understanding-an-api-52m3</link>
      <guid>https://dev.to/devmayor15/the-beginners-guide-to-understanding-an-api-52m3</guid>
      <description>&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;

&lt;h5&gt;
  
  
  If curiosity pushes you to learn about API's and you have the urge to learn about them, I highly recommend this article for you.
&lt;/h5&gt;

&lt;p&gt;If you have written your first programming language like the&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log("hello world!")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;print("Hello World!")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then this article is suitable for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction to API
&lt;/h2&gt;

&lt;p&gt;The way we humans talk and communicate with each other by any form, maybe gestures, signs, is different to the way other creatures talk to themselves. But did you ever ask yourself how an app does that?&lt;/p&gt;

&lt;p&gt;For instance, each time you listen or stream your favorite music via spotify or binge watch a movie on netflix, you are indirectly using an API.&lt;/p&gt;

&lt;p&gt;In this article, I’ll present just how big an impact APIs have in our lives. &lt;/p&gt;

&lt;h2&gt;
  
  
  What is an API?
&lt;/h2&gt;

&lt;p&gt;In the process of improving your applications, you will eventually come across a term like API.&lt;/p&gt;

&lt;p&gt;API stands for &lt;strong&gt;Application Programme Interface&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is almost impossible to imagine modern web development without API's. I will try to explain it as simple as possible.&lt;/p&gt;

&lt;p&gt;An API (Application Programming Interface) is a set of functions that allows applications to access data and interact with external software components, operating systems, or microservices. To simplify, an API delivers a user request to a system and sends the system’s response back to a user.&lt;/p&gt;

&lt;p&gt;API is like an open language, the rules of which are shared by a certain service.&lt;/p&gt;

&lt;p&gt;APIs are highly used because they can make things way easier and speed up the development process of other systems and applications.&lt;/p&gt;

&lt;p&gt;You can teach your application the rules of this language, so it can communicate with the service and access all the functions and data that the service is ready to share.&lt;/p&gt;

&lt;p&gt;Speaking formally, an API is an interface that allows your application to interact with an external service using a simple set of commands.&lt;/p&gt;

&lt;p&gt;APIs are highly used because they can make things way easier and speed up the development process of other systems and applications. For example, if you are building your own software and wish to integrate face recognition or payment processing, using an API is the best way to do it. You just have to connect your software with another one. These are provided with the API’s documentation which is a manual for developers to help implement the desired functionalities.&lt;/p&gt;

&lt;p&gt;The fun part is that you don't need to know or understand the internal logic of the service or deal with any source code by just sending a simple set of command and the service will run the necessary data. Sounds good, right? Cool, let’s take a look at just how APIs do that.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the engine behind this API?
&lt;/h2&gt;

&lt;p&gt;Think of an API to be the “middleman” between the application you are using and the server. When you tell your mobile application or app to do something for you, then it will rush down to the API to assist in fetching your request. Afterward the server will send a response to be delivered by the "middleman" to your app.&lt;/p&gt;

&lt;p&gt;For example, if you need to contact the &lt;a href="https://rapidapi.com/blog/rapidapi-featured-news-apis/"&gt;news aggregator api&lt;/a&gt; and get ten of today’s most popular news from it, you refer to the “topnews” command (which the service described in advance in the public domain), and in response, the service will send you the latest collection of sensations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of an API
&lt;/h2&gt;

&lt;p&gt;APIs allow you to save time when developing and help not to invent a Car.&lt;/p&gt;

&lt;p&gt;APIs recharge your applications with the latest technology. With APIs, you can teach your application the latest image recognition and natural language processing methods.&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of API
&lt;/h2&gt;

&lt;p&gt;Although APIs are classified under use cases and release policy. We'll be discussing the major types.&lt;/p&gt;

&lt;p&gt;There are four main types of APIs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Open APIs:&lt;/strong&gt; In its simplest form, this type of API allows no form of restriction to using them because they are publicly available.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Internal APIs:&lt;/strong&gt; Also known as Private APIs, only internal systems expose this type of API, which is, therefore, less known and often meant to be used inside the company. The company uses this type of API among the different internal teams to be able to improve its products and services.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Partner APIs:&lt;/strong&gt; One needs specific rights or licenses in order to access this type of APIs because they are not available to the public. A partner API also adds value to the service and opens up a channel for up-selling.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Composite APIs:&lt;/strong&gt; This type of API combines different data and service APIs. It is a sequence of tasks that run synchronously as a result of the execution and not at the request of a task. Its main uses are to speed up the process of execution and improve the performance of the listeners in the web interfaces.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of particular interest are SOAP APIs and REST APIs, since these are very widespread.&lt;/p&gt;

&lt;h2&gt;
  
  
  EndPoints
&lt;/h2&gt;

&lt;p&gt;Endpoints are basically the key elements in the interaction of your application with the API. Usually, it is a specific address (for example, &lt;a href="https://newssite.com/topnews"&gt;https://newssite.com/topnews&lt;/a&gt;), by referring to which you get access to certain features/functions.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Like Muse would say, You don’t need to test an API on Postman Application before you are aware of the capabilities of the API.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Request Method
&lt;/h2&gt;

&lt;p&gt;Request Methods characterize what action we are going to take by referring to the API. In total, there are four main types of actions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GET:&lt;/strong&gt; Requests data from a server. This is the most common type of request. Using it we can get the data we are interested in from those that the API is ready to share.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;POST:&lt;/strong&gt; What it simply does is that it adds new data to the server.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;PUT:&lt;/strong&gt; This request method changes existing information. For example, using this type of request, it would be possible to change the color or value of an existing product.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;DELETE:&lt;/strong&gt; Delete an existing Information.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;I hope this article helped you better understand how APIs work and just how important they are in the world of information technology.&lt;/p&gt;

&lt;p&gt;You can now head straight to learning how to use an API and receive informations in your different programming language/s.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>tutorial</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
