<?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: Vratislav Kopp</title>
    <description>The latest articles on DEV Community by Vratislav Kopp (@supervrata).</description>
    <link>https://dev.to/supervrata</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%2F848089%2Fe4365519-642c-49bf-a6cf-533ccc7d779a.jpeg</url>
      <title>DEV Community: Vratislav Kopp</title>
      <link>https://dev.to/supervrata</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/supervrata"/>
    <language>en</language>
    <item>
      <title>Let's stop wasting time</title>
      <dc:creator>Vratislav Kopp</dc:creator>
      <pubDate>Thu, 12 May 2022 13:08:54 +0000</pubDate>
      <link>https://dev.to/superface/lets-stop-wasting-time-3h4o</link>
      <guid>https://dev.to/superface/lets-stop-wasting-time-3h4o</guid>
      <description>&lt;p&gt;I've known our founder Zdeněk for almost 20 years now. He probably won’t remember, but there is one particular conversation that strongly affected my decision to join Superface years after it had happened.&lt;/p&gt;

&lt;p&gt;It must have been around 2012. Zdeněk had just resigned from his job, likely not knowing he would join Apiary a couple of months later, changing the course of his career and ultimately leading to Superface being born. We were standing in front of a bar in Prague, and he was telling me how a whole generation of the most brilliant brains gets wasted. People become software engineers and designers to change the world, only to spend careers in meaningless corporate jobs, doing repetitive work, building software nobody needs.&lt;/p&gt;

&lt;p&gt;This strongly resonated with me. I don't claim to possess a brilliant brain, but I’ve always looked for meaning in my work. Apparently, I was looking in all the wrong places.&lt;/p&gt;

&lt;p&gt;Tried corporate, was bored, worked in agencies and founded one, burnt out, took a break to gain energy, joined a startup, ran out of money, found a secure job, was bored again. I worked on countless projects the world could do without, and wanted to break the cycle.&lt;/p&gt;

&lt;p&gt;Then Zdeněk approached me with the idea behind Superface. At first, I thought, nah. A developer tool to make nerds nerdier. Whatever. But then, after a couple of days, the scene from 2012 came back to me.&lt;/p&gt;

&lt;p&gt;In 2020, when we had just embarked on the Superface journey, the &lt;a href="https://superface.ai/blog/the-cost-of-apis"&gt;estimated cost of API work was 80 billion USD&lt;/a&gt;. That's 1.5x the cost of getting the mankind to Mars.&lt;/p&gt;

&lt;p&gt;Convert it to developer hours, and you’ll see we're talking about thousands of people spending their best years making machines talk to each other by integrating APIs and maintaining the connections. A big part of the wasted time Zdeněk was talking about.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8aFwX0DM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mg6c7fbca5ic5pwv8x0u.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8aFwX0DM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mg6c7fbca5ic5pwv8x0u.jpeg" alt="Switchboard" width="880" height="619"&gt;&lt;/a&gt;&lt;/p&gt;


Photo by &lt;a href="https://unsplash.com/@museumsvictoria?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Museums Victoria&lt;/a&gt; on &lt;a href="https://unsplash.com/photos/WGeO6dW5GZM?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;





&lt;p&gt;I’m not a developer myself, but I do have my share of experience with APIs. Once, I was a part of a project where the company responsible for backend development almost went bankrupt, and several people resigned solely because they underestimated how tough it would be to integrate with the main vendor’s API. I have quite a few stories like this, unfortunately.&lt;/p&gt;

&lt;p&gt;Integrating the same APIs over and over again and trying to figure out how to integrate new ones usually ate up a serious part of the budget. When I worked at agencies, the development time we sold to do API integrations was an important part of our income. But constantly reinventing the wheel would inevitably start to feel like a waste of time and potential for both our developers and clients.&lt;/p&gt;

&lt;p&gt;Realizing all this, I knew I had to join Superface.&lt;/p&gt;

&lt;p&gt;Think about how most of the new products and services are built. To create anything today, we have to make machines talk to each other. A new product is usually a new node of added value that can only function when connected to a couple of other such nodes. This is made possible by integrating a bunch of APIs. If we consider a typical commercial service of today, we typically have to implement some payments, communication capabilities, user administration, etc. Many ideas never see the light only because of the cost and expertise necessary to do all the integrations. If we manage to make machines do the hard work and ultimately discover and integrate digital capabilities autonomously, it's going to be big.&lt;/p&gt;

&lt;p&gt;We’re on a difficult journey, but what we do is important. Superface is not an intellectual exercise to prove that our architectural pattern is superior to others. We're in it to free people’s hands and minds to do creative work. We believe that enabling more connections between digital capabilities and having machines to handle the tedious stuff can speed up the evolution of mankind.&lt;/p&gt;

&lt;p&gt;I wrote this post mainly for my friends, who would never guess I’d go build something for developers and now see me all fired up about APIs. If you happen to be a developer who sometimes has to deal with integrating APIs, I suggest checking out our &lt;a href="https://github.com/superfaceai"&gt;GitHub&lt;/a&gt; and &lt;a href="https://superface.ai/docs"&gt;docs&lt;/a&gt;. If you’re not technical but are wondering how your organization can benefit from using Superface, hit me at &lt;code&gt;v@superface.ai&lt;/code&gt; to talk more.&lt;/p&gt;

</description>
      <category>career</category>
      <category>api</category>
      <category>startup</category>
    </item>
    <item>
      <title>Using a different geocode service for different countries</title>
      <dc:creator>Vratislav Kopp</dc:creator>
      <pubDate>Tue, 19 Apr 2022 12:01:32 +0000</pubDate>
      <link>https://dev.to/superface/using-a-different-geocode-service-for-different-countries-2j07</link>
      <guid>https://dev.to/superface/using-a-different-geocode-service-for-different-countries-2j07</guid>
      <description>&lt;p&gt;When we want to convert an address into latitude and longitude, we usually have to pick the best provider we can and deal with the varying levels of quality. For instance, sometimes one provider is better than another in a specific area of the world. The &lt;a href="https://dev.to/superface/integrate-geocoding-the-right-way-4e7l"&gt;first article in this series&lt;/a&gt; shows how to access multiple geocoding providers with a single implementation using Superface OneSDK. Let’s now take a look at how can different providers be used based on the country to get the best quality.&lt;/p&gt;

&lt;p&gt;Let’s say we do some research and determine that Google Maps work better in the US than other providers (this may not be true). And let’s say that we decide to use Google Maps only for US addresses, but Here.com for everywhere else.&lt;/p&gt;

&lt;p&gt;We can write a bit of JavaScript to capture this decision.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;providerName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;addressCountry&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;US&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;google-apis-maps&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;here&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Normally, after we sign up for accounts for these services, we’d have to find their API documentation, learn how their API works, install their SDKs or build our own integration code, then manage all the differences between them over time. Instead, we can use our &lt;a href="https://superface.ai/docs/reference/one-sdk"&gt;OneSDK&lt;/a&gt; to make this simpler.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;provider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getProvider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;providerName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getUseCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Geocode&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;perform&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;addressCountry&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;United States&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;addressLocality&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Manhattan&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;postalCode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;NY 10036&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;streetAddress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Times Square&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;provider&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We’re able to interact with both Google Maps and Here.com with less than 10 lines of code, and we can jump between them based on any criteria we choose. In this case, we chose based on the country, but maybe for your case it needs to be something different.&lt;/p&gt;

&lt;p&gt;Check out &lt;a href="https://superface.ai/solutions/geocode"&gt;our geocode page&lt;/a&gt; to see learn more about using Superface for geocoding.&lt;/p&gt;

&lt;h3&gt;
  
  
  Read next
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/superface/integrate-geocoding-the-right-way-4e7l"&gt;Integrate geocoding the right way&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/superface/reliable-ip-geolocation-with-superface-5372"&gt;Reliable IP Geolocation with Superface&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This post was originally written by &lt;a class="mentioned-user" href="https://dev.to/smizell"&gt;@smizell&lt;/a&gt; &lt;/p&gt;

</description>
      <category>geocode</category>
      <category>javascript</category>
      <category>api</category>
      <category>node</category>
    </item>
    <item>
      <title>Integrate geocoding the right way</title>
      <dc:creator>Vratislav Kopp</dc:creator>
      <pubDate>Tue, 19 Apr 2022 11:55:27 +0000</pubDate>
      <link>https://dev.to/superface/integrate-geocoding-the-right-way-4e7l</link>
      <guid>https://dev.to/superface/integrate-geocoding-the-right-way-4e7l</guid>
      <description>&lt;p&gt;This is the first article in a series covering integrating geocode to Node.js applications in a way that lets you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create an integration that never breaks&lt;/li&gt;
&lt;li&gt;Use different API providers based on location&lt;/li&gt;
&lt;li&gt;Make sure you always get the data you need&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  There is no single best provider
&lt;/h2&gt;

&lt;p&gt;When integrating geocoding, most developers start by comparing a couple of geocoding API providers, choose the seemingly best one and bake it in their app.&lt;/p&gt;

&lt;p&gt;However, there is no single best Geocoding API. Moreover, getting familiar with every considered provider takes time, and hard-wiring just one achieves nothing but vendor lock.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integrate them all
&lt;/h2&gt;

&lt;p&gt;Instead of looking for a unicorn, &lt;a href="https://dev.to/superface/stop-the-manual-api-plumbing-5639"&gt;integrate the business use-case&lt;/a&gt; and access any provider of preference at the runtime. This can be achieved using &lt;a href="https://www.superface.ai"&gt;Superface&lt;/a&gt;'s open source OneSDK, which serves as a universal interface to many APIs. Here’s how to do it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Integrate geocoding using Superface OneSDK
&lt;/h2&gt;

&lt;p&gt;The following steps are pretty straightforward, however if this is your first run with Superface or you just want a better understanding of what’s happening under the hood, &lt;a href="https://superface.ai/docs"&gt;read the documentation&lt;/a&gt;.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install Superface OneSDK package in your project folder.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; @superfaceai/one-sdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install &lt;strong&gt;&lt;code&gt;address/geocoding&lt;/code&gt;&lt;/strong&gt; profile.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx @superfaceai/cli &lt;span class="nb"&gt;install &lt;/span&gt;address/geocoding
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure desired providers. &lt;code&gt;Nominatim&lt;/code&gt; offers their API publicly. No keys required.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Here.com&lt;/span&gt;
npx @superfaceai/cli configure here -p address/geocoding

&lt;span class="c"&gt;# Google Maps&lt;/span&gt;
npx @superfaceai/cli configure google-apis-maps -p address/geocoding

&lt;span class="c"&gt;# Azure Maps&lt;/span&gt;
npx @superfaceai/cli configure azure &lt;span class="nt"&gt;-p&lt;/span&gt; address/geocoding

&lt;span class="c"&gt;# OpenCage&lt;/span&gt;
npx @superfaceai/cli configure opencage &lt;span class="nt"&gt;-p&lt;/span&gt; address/geocoding

&lt;span class="c"&gt;# TomTom&lt;/span&gt;
npx @superfaceai/cli configure opencage -p address/geocoding

&lt;span class="c"&gt;# Nominatim&lt;/span&gt;
npx @superfaceai/cli configure nominatim &lt;span class="nt"&gt;-p&lt;/span&gt; address/geocoding
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;If you need another provider, &lt;a href="//mailto:v@superface.ai"&gt;let me know.&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Obtain API keys for the desired providers and set them as an environment variable.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Here.com&lt;/span&gt;
&lt;span class="nb"&gt;export&lt;/span&gt; HERE_API_KEY&lt;span class="o"&gt;=&lt;/span&gt;your-value-from-here

&lt;span class="c"&gt;# Google Maps&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GOOGLE_APIS_MAPS_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your-value-from-google-maps

&lt;span class="c"&gt;# Azure Maps&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;AZURE_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your-value-from-azure

&lt;span class="c"&gt;# OpenCage&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;OPENCAGE_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your-value-from-opencage

&lt;span class="c"&gt;# TomTom&lt;/span&gt;
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;TOMTOM_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;your-value-from-tomtom
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;How to get API keys: &lt;a href="https://superface.ai/docs/tutorials/getting-api-keys/here-com"&gt;Here.com&lt;/a&gt; | &lt;a href="https://superface.ai/docs/tutorials/getting-api-keys/google-maps"&gt;Google Maps&lt;/a&gt; | &lt;a href="https://superface.ai/docs/tutorials/getting-api-keys/azure-maps"&gt;Azure Maps&lt;/a&gt; | &lt;a href="https://superface.ai/docs/tutorials/getting-api-keys/opencage"&gt;OpenCage&lt;/a&gt; | &lt;a href="https://superface.ai/docs/tutorials/getting-api-keys/tomtom"&gt;TomTom&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the following code in your Node.js application and replace the example address with your input:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;SuperfaceClient&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;@superfaceai/one-sdk&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;Geocoding&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;sdk&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;SuperfaceClient&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="c1"&gt;// Load the installed profile&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;profile&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getProfile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;address/geocoding&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Choose the provider&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;provider&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;sdk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getProvider&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;nominatim&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Use the profile&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;profile&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getUseCase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Geocode&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;perform&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
      &lt;span class="na"&gt;addressCountry&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;United States&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;addressLocality&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Manhattan&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;postalCode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;NY 10036&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;streetAddress&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Times Square&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;provider&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="c1"&gt;// Check out the result&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;unwrap&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nx"&gt;Geocoding&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the code.&lt;/p&gt;

&lt;p&gt;Calling the &lt;code&gt;Geocoding&lt;/code&gt; function should return a similar result:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="o"&gt;{&lt;/span&gt; latitude: &lt;span class="s1"&gt;'40.757280550000004'&lt;/span&gt;, longitude: &lt;span class="s1"&gt;'-73.98585503545917'&lt;/span&gt; &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;And that’s it. Your basic integration is ready. &lt;/p&gt;

&lt;h2&gt;
  
  
  Read next
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/superface/using-a-different-geocode-service-for-different-countries-2j07"&gt;Use different providers for different locations&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>geocode</category>
      <category>javascript</category>
      <category>api</category>
      <category>node</category>
    </item>
  </channel>
</rss>
