<?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: Laurent Egbakou</title>
    <description>The latest articles on DEV Community by Laurent Egbakou (@lioncoding).</description>
    <link>https://dev.to/lioncoding</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%2F373525%2Faed3f343-529c-4480-9495-750e34b6c932.jpg</url>
      <title>DEV Community: Laurent Egbakou</title>
      <link>https://dev.to/lioncoding</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/lioncoding"/>
    <language>en</language>
    <item>
      <title>Getting Started with RESTCountries.NET</title>
      <dc:creator>Laurent Egbakou</dc:creator>
      <pubDate>Sun, 24 May 2020 01:30:00 +0000</pubDate>
      <link>https://dev.to/lioncoding/getting-started-with-restcountries-net-31j3</link>
      <guid>https://dev.to/lioncoding/getting-started-with-restcountries-net-31j3</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qaCTMv0C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AeRBPmddj7YoW-37diJITPA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qaCTMv0C--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AeRBPmddj7YoW-37diJITPA.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this article, Let me show you my open source Nuget package &lt;a href="https://www.nuget.org/packages/RESTCountries.NET/"&gt;RESTCountries.NET&lt;/a&gt; developed in .NET Standard.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.nuget.org/packages/RESTCountries.NET/"&gt;RESTCountries.NET&lt;/a&gt; is a .NET Standard wrapper library around the API provided by REST Countries(&lt;a href="https://restcountries.eu"&gt;https://restcountries.eu&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://restcountries.eu"&gt;htpps://restcountries.eu&lt;/a&gt; is a RESTful API which provides information about countries such as name , capital city , population , currencies ,borders info , languages , flag , calling codes , etc.&lt;/p&gt;

&lt;p&gt;With &lt;strong&gt;RESTCountries.NET&lt;/strong&gt; , we can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Retrieve a list of countries.&lt;/li&gt;
&lt;li&gt;Get a list of country names in others languages such as &lt;strong&gt;&lt;em&gt;German&lt;/em&gt;&lt;/strong&gt; , &lt;strong&gt;&lt;em&gt;Spanish&lt;/em&gt;&lt;/strong&gt; , &lt;strong&gt;&lt;em&gt;French&lt;/em&gt;&lt;/strong&gt; , &lt;strong&gt;&lt;em&gt;Italian, Portuguese, Dutch, Croatian&lt;/em&gt;&lt;/strong&gt; , &lt;strong&gt;&lt;em&gt;Japanese&lt;/em&gt;&lt;/strong&gt; , &lt;strong&gt;&lt;em&gt;Breton&lt;/em&gt;&lt;/strong&gt; , and &lt;strong&gt;&lt;em&gt;Persian&lt;/em&gt;&lt;/strong&gt; language.&lt;/li&gt;
&lt;li&gt;Search by country name.&lt;/li&gt;
&lt;li&gt;Search by capital city.&lt;/li&gt;
&lt;li&gt;Search by ISO 4217 currency code.&lt;/li&gt;
&lt;li&gt;Search by continent: Africa, Americas, Asia, Europe, Oceania.&lt;/li&gt;
&lt;li&gt;Search by regional bloc.&lt;/li&gt;
&lt;li&gt;Apply filters to retrieve what we need.&lt;/li&gt;
&lt;li&gt;etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Setup
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The library is available on NuGet at &lt;a href="https://www.nuget.org/packages/RESTCountries.NET/"&gt;https://www.nuget.org/packages/RESTCountries.NET/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Install it into your .NET project(.NET Standard, .NET Core, Xamarin, etc).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cWh61zXW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/864/1%2Aoqjo0kuxpH66pZne91RW_A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cWh61zXW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/864/1%2Aoqjo0kuxpH66pZne91RW_A.png" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Usage
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Add namespace&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Get all countries&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;Each method return an object of type &lt;a href="https://github.com/egbakou/RESTCountries.NET/blob/master/src/RESTCountries.NET/Models/Country.cs"&gt;&lt;em&gt;Country&lt;/em&gt;&lt;/a&gt; or a &lt;em&gt;List&lt;/em&gt; of &lt;a href="https://github.com/egbakou/RESTCountries.NET/blob/master/src/RESTCountries.NET/Models/Country.cs"&gt;&lt;em&gt;Country&lt;/em&gt;&lt;/a&gt;. You can apply filters on the returned value to retrieve what you need.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Get a list of country names&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;Country names are in English by default.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Retrieve a list of country names in Spanish&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;Available languages are: de(German language), es(Spanish language), fr(French language), ja(Japanese language), it(Italian language), br(Breton language), pt(Portuguese language), nl(Dutch language), hr(Croatian language) and fa(Persian language).&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Search by country partial name or full name&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;The first method could return a list of countries or a list of one element.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Search by continent: Africa, Americas, Asia, Europe, Oceania&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;blockquote&gt;
&lt;p&gt;Possibles values of “continent” are &lt;strong&gt;Africa, Americas, Asia, Europe and Oceania.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For more information, check out the full documentation at &lt;a href="https://github.com/egbakou/RESTCountries.NET"&gt;https://github.com/egbakou/RESTCountries.NET&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;In web applications(.NET or .NET Core) RESTCountries.NET allows us to populate country select tag options dynamically. Populate Xamarin Picker with a list of countries become easy.&lt;/p&gt;

</description>
      <category>xamarinforms</category>
      <category>nugetpackage</category>
      <category>countrydata</category>
      <category>netcore</category>
    </item>
  </channel>
</rss>
