{"id":3907,"date":"2023-11-04T23:13:55","date_gmt":"2023-11-04T23:13:55","guid":{"rendered":"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/"},"modified":"2023-11-05T05:48:28","modified_gmt":"2023-11-05T05:48:28","slug":"how-to-create-a-weather-app-with-kotlin-and-android","status":"publish","type":"post","link":"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/","title":{"rendered":"How to Create a Weather App with Kotlin and Android"},"content":{"rendered":"

In this tutorial, we will learn how to create a weather app using Kotlin and the Android platform. The app will fetch weather data from an API and display it in a user-friendly format.<\/p>\n

Prerequisites<\/h2>\n

Before getting started, make sure you have the following:<\/p>\n

    \n
  1. Android Studio installed on your machine.<\/li>\n
  2. Basic knowledge of Kotlin programming language.<\/li>\n
  3. An API key (we will be using the OpenWeatherMap API in this tutorial).<\/li>\n<\/ol>\n

    Setting up the Project<\/h2>\n
      \n
    1. Open Android Studio and click on “Start a new Android Studio project”.<\/li>\n
    2. Select “Empty Activity” and click “Next”.<\/li>\n
    3. Enter a name for your project and select a package name. Also, make sure the language is set to Kotlin. Click “Finish” to create the project.<\/li>\n<\/ol>\n

      Adding necessary dependencies<\/h2>\n

      Open the build.gradle<\/code> file of your app module and add the following dependencies:<\/p>\n

      implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2'\nimplementation 'com.squareup.okhttp3:okhttp:4.9.1'\nimplementation 'com.google.code.gson:gson:2.8.8'\nimplementation 'com.github.bumptech.glide:glide:4.12.0'\n<\/code><\/pre>\n

      Once the dependencies are added, sync your project.<\/p>\n

      Creating the Weather Service<\/h2>\n

      Next, we will create a weather service that fetches weather data from the OpenWeatherMap API. Create a new Kotlin class called WeatherService<\/code> and add the following code:<\/p>\n

      import okhttp3.OkHttpClient\nimport okhttp3.Request\nimport kotlinx.coroutines.Dispatchers\nimport kotlinx.coroutines.withContext\nimport com.google.gson.Gson\n\nclass WeatherService(private val apiKey: String) {\n\n    private val client = OkHttpClient()\n\n    suspend fun getWeather(city: String): WeatherData {\n        val url = \"https:\/\/api.openweathermap.org\/data\/2.5\/weather?q=$city&appid=$apiKey\"\n        val request = Request.Builder().url(url).build()\n\n        return withContext(Dispatchers.IO) {\n            val response = client.newCall(request).execute()\n            val body = response.body()?.string()\n            Gson().fromJson(body, WeatherData::class.java)\n        }\n    }\n}\n<\/code><\/pre>\n

      In the getWeather<\/code> function, we use the OkHttpClient<\/code> to make a network request to the OpenWeatherMap API. The response is then converted into a WeatherData<\/code> object using Gson.<\/p>\n

      Creating the WeatherData model<\/h2>\n

      Next, we will create a Kotlin data class called WeatherData<\/code> that represents the weather data returned by the API. Add the following code to the WeatherData.kt<\/code> file:<\/p>\n

      data class WeatherData(\n    val name: String,\n    val main: MainData,\n    val weather: List<Weather>\n)\n\ndata class MainData(\n    val temp: Double,\n    val humidity: Int\n)\n\ndata class Weather(\n    val main: String,\n    val description: String,\n    val icon: String\n)\n<\/code><\/pre>\n

      The WeatherData<\/code> class contains properties like the city name, temperature, humidity, and a list of weather conditions. The MainData<\/code> class represents the main weather data, and the Weather<\/code> class represents a single weather condition.<\/p>\n

      Creating the MainActivity layout<\/h2>\n

      Open the activity_main.xml<\/code> layout file and replace the default code with the following:<\/p>\n

      <RelativeLayout xmlns_android=\"http:\/\/schemas.android.com\/apk\/res\/android\"\n    xmlns_tools=\"http:\/\/schemas.android.com\/tools\"\n    android_id=\"@+id\/container\"\n    android_layout_width=\"match_parent\"\n    android_layout_height=\"match_parent\"\n    android_paddingBottom=\"@dimen\/activity_vertical_margin\"\n    android_paddingLeft=\"@dimen\/activity_horizontal_margin\"\n    android_paddingRight=\"@dimen\/activity_horizontal_margin\"\n    android_paddingTop=\"@dimen\/activity_vertical_margin\"\n    tools_context=\".MainActivity\">\n\n    <EditText\n        android_id=\"@+id\/cityEditText\"\n        android_layout_width=\"match_parent\"\n        android_layout_height=\"wrap_content\"\n        android_hint=\"Enter city name\"\n        android_imeOptions=\"actionSearch\"\n        android_singleLine=\"true\" \/>\n\n    <Button\n        android_id=\"@+id\/fetchButton\"\n        android_layout_width=\"wrap_content\"\n        android_layout_height=\"wrap_content\"\n        android_layout_below=\"@id\/cityEditText\"\n        android_layout_centerHorizontal=\"true\"\n        android_text=\"Fetch Weather\" \/>\n\n    <TextView\n        android_id=\"@+id\/weatherTextView\"\n        android_layout_width=\"match_parent\"\n        android_layout_height=\"wrap_content\"\n        android_layout_below=\"@id\/fetchButton\"\n        android_gravity=\"center\"\n        android_textSize=\"24sp\" \/>\n\n    <ImageView\n        android_id=\"@+id\/weatherIconImageView\"\n        android_layout_width=\"wrap_content\"\n        android_layout_height=\"wrap_content\"\n        android_layout_below=\"@id\/weatherTextView\"\n        android_layout_centerHorizontal=\"true\"\n        android_layout_marginTop=\"16dp\"\n        android_contentDescription=\"Weather icon\" \/>\n\n<\/RelativeLayout>\n<\/code><\/pre>\n

      We have added an EditText to enter the city name, a Button to fetch the weather, a TextView to display the weather information, and an ImageView to display the weather icon.<\/p>\n

      Implementing the MainActivity logic<\/h2>\n

      Open the MainActivity.kt<\/code> file and replace the default code with the following:<\/p>\n

      import android.os.Bundle\nimport android.view.View\nimport android.widget.Button\nimport android.widget.EditText\nimport android.widget.ImageView\nimport android.widget.TextView\nimport androidx.appcompat.app.AppCompatActivity\nimport com.bumptech.glide.Glide\nimport kotlinx.coroutines.CoroutineScope\nimport kotlinx.coroutines.MainScope\nimport kotlinx.coroutines.launch\n\nclass MainActivity : AppCompatActivity(), CoroutineScope by MainScope() {\n\n    private lateinit var weatherService: WeatherService\n    private lateinit var cityEditText: EditText\n    private lateinit var fetchButton: Button\n    private lateinit var weatherTextView: TextView\n    private lateinit var weatherIconImageView: ImageView\n\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        setContentView(R.layout.activity_main)\n\n        weatherService = WeatherService(\"YOUR_API_KEY\")\n        cityEditText = findViewById(R.id.cityEditText)\n        fetchButton = findViewById(R.id.fetchButton)\n        weatherTextView = findViewById(R.id.weatherTextView)\n        weatherIconImageView = findViewById(R.id.weatherIconImageView)\n\n        fetchButton.setOnClickListener {\n            val city = cityEditText.text.toString()\n            if (city.isNotEmpty()) {\n                fetchWeather(city)\n            }\n        }\n    }\n\n    private fun fetchWeather(city: String) {\n        launch {\n            try {\n                val weatherData = weatherService.getWeather(city)\n                val temperature = weatherData.main.temp.toString()\n                val humidity = weatherData.main.humidity.toString()\n                val weatherDescription = weatherData.weather.first().description\n                val weatherIconUrl = \"https:\/\/openweathermap.org\/img\/w\/${weatherData.weather.first().icon}.png\"\n\n                weatherTextView.text = \"Temperature: $temperature \u00b0CnHumidity: $humidity%n$weatherDescription\"\n                Glide.with(this@MainActivity)\n                    .load(weatherIconUrl)\n                    .into(weatherIconImageView)\n            } catch (e: Exception) {\n                weatherTextView.text = \"Error fetching weather data\"\n                weatherIconImageView.setImageDrawable(null)\n            }\n        }\n    }\n}\n<\/code><\/pre>\n

      Replace 'YOUR_API_KEY'<\/code> with your actual OpenWeatherMap API key.<\/p>\n

      In the fetchWeather<\/code> function, we make use of the weatherService<\/code> to fetch weather data for the specified city. We then update the UI with the temperature, humidity, weather description, and weather icon using the Glide library.<\/p>\n

      Testing the App<\/h2>\n

      Connect your Android device or start an emulator, and click on the “Run” button in Android Studio to install and run the app. Enter a city name in the EditText and click the “Fetch Weather” button to see the weather data for that city.<\/p>\n

      Conclusion<\/h2>\n

      In this tutorial, we learned how to create a weather app using Kotlin and Android. We made use of the OpenWeatherMap API to fetch weather data and displayed it in a user-friendly format. You can further enhance this app by adding more features like a forecast for multiple days or a search history. Feel free to explore and experiment with different features to make the app more useful and interactive.<\/p>\n","protected":false},"excerpt":{"rendered":"

      In this tutorial, we will learn how to create a weather app using Kotlin and the Android platform. The app will fetch weather data from an API and display it in a user-friendly format. Prerequisites Before getting started, make sure you have the following: Android Studio installed on your machine. Continue Reading<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","footnotes":""},"categories":[1],"tags":[259,261,264,263,258,9,262,260,257],"yoast_head":"\nHow to Create a Weather App with Kotlin and Android - Pantherax Blogs<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create a Weather App with Kotlin and Android\" \/>\n<meta property=\"og:description\" content=\"In this tutorial, we will learn how to create a weather app using Kotlin and the Android platform. The app will fetch weather data from an API and display it in a user-friendly format. Prerequisites Before getting started, make sure you have the following: Android Studio installed on your machine. Continue Reading\" \/>\n<meta property=\"og:url\" content=\"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/\" \/>\n<meta property=\"og:site_name\" content=\"Pantherax Blogs\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-04T23:13:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-05T05:48:28+00:00\" \/>\n<meta name=\"author\" content=\"Panther\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Panther\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t \"@context\": \"https:\/\/schema.org\",\n\t \"@graph\": [\n\t {\n\t \"@type\": \"Article\",\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/#article\",\n\t \"isPartOf\": {\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/\"\n\t },\n\t \"author\": {\n\t \"name\": \"Panther\",\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/person\/b63d816f4964b163e53cbbcffaa0f3d7\"\n\t },\n\t \"headline\": \"How to Create a Weather App with Kotlin and Android\",\n\t \"datePublished\": \"2023-11-04T23:13:55+00:00\",\n\t \"dateModified\": \"2023-11-05T05:48:28+00:00\",\n\t \"mainEntityOfPage\": {\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/\"\n\t },\n\t \"wordCount\": 486,\n\t \"publisher\": {\n\t \"@id\": \"http:\/\/localhost:10003\/#organization\"\n\t },\n\t \"keywords\": [\n\t \"\\\"Android Development\\\"\",\n\t \"\\\"API Integration\\\"\",\n\t \"\\\"Code Examples\\\"]\",\n\t \"\\\"Functionality\\\"\",\n\t \"\\\"Kotlin\\\"\",\n\t \"\\\"mobile app development\\\"\",\n\t \"\\\"User Interface Design\\\"\",\n\t \"\\\"Weather Data\\\"\",\n\t \"[\\\"Weather App\\\"\"\n\t ],\n\t \"inLanguage\": \"en-US\"\n\t },\n\t {\n\t \"@type\": \"WebPage\",\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/\",\n\t \"url\": \"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/\",\n\t \"name\": \"How to Create a Weather App with Kotlin and Android - Pantherax Blogs\",\n\t \"isPartOf\": {\n\t \"@id\": \"http:\/\/localhost:10003\/#website\"\n\t },\n\t \"datePublished\": \"2023-11-04T23:13:55+00:00\",\n\t \"dateModified\": \"2023-11-05T05:48:28+00:00\",\n\t \"breadcrumb\": {\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/#breadcrumb\"\n\t },\n\t \"inLanguage\": \"en-US\",\n\t \"potentialAction\": [\n\t {\n\t \"@type\": \"ReadAction\",\n\t \"target\": [\n\t \"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/\"\n\t ]\n\t }\n\t ]\n\t },\n\t {\n\t \"@type\": \"BreadcrumbList\",\n\t \"@id\": \"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/#breadcrumb\",\n\t \"itemListElement\": [\n\t {\n\t \"@type\": \"ListItem\",\n\t \"position\": 1,\n\t \"name\": \"Home\",\n\t \"item\": \"http:\/\/localhost:10003\/\"\n\t },\n\t {\n\t \"@type\": \"ListItem\",\n\t \"position\": 2,\n\t \"name\": \"How to Create a Weather App with Kotlin and Android\"\n\t }\n\t ]\n\t },\n\t {\n\t \"@type\": \"WebSite\",\n\t \"@id\": \"http:\/\/localhost:10003\/#website\",\n\t \"url\": \"http:\/\/localhost:10003\/\",\n\t \"name\": \"Pantherax Blogs\",\n\t \"description\": \"\",\n\t \"publisher\": {\n\t \"@id\": \"http:\/\/localhost:10003\/#organization\"\n\t },\n\t \"potentialAction\": [\n\t {\n\t \"@type\": \"SearchAction\",\n\t \"target\": {\n\t \"@type\": \"EntryPoint\",\n\t \"urlTemplate\": \"http:\/\/localhost:10003\/?s={search_term_string}\"\n\t },\n\t \"query-input\": \"required name=search_term_string\"\n\t }\n\t ],\n\t \"inLanguage\": \"en-US\"\n\t },\n\t {\n\t \"@type\": \"Organization\",\n\t \"@id\": \"http:\/\/localhost:10003\/#organization\",\n\t \"name\": \"Pantherax Blogs\",\n\t \"url\": \"http:\/\/localhost:10003\/\",\n\t \"logo\": {\n\t \"@type\": \"ImageObject\",\n\t \"inLanguage\": \"en-US\",\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/logo\/image\/\",\n\t \"url\": \"http:\/\/localhost:10003\/wp-content\/uploads\/2023\/11\/cropped-9e7721cb-2d62-4f72-ab7f-7d1d8db89226.jpeg\",\n\t \"contentUrl\": \"http:\/\/localhost:10003\/wp-content\/uploads\/2023\/11\/cropped-9e7721cb-2d62-4f72-ab7f-7d1d8db89226.jpeg\",\n\t \"width\": 1024,\n\t \"height\": 1024,\n\t \"caption\": \"Pantherax Blogs\"\n\t },\n\t \"image\": {\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/logo\/image\/\"\n\t }\n\t },\n\t {\n\t \"@type\": \"Person\",\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/person\/b63d816f4964b163e53cbbcffaa0f3d7\",\n\t \"name\": \"Panther\",\n\t \"image\": {\n\t \"@type\": \"ImageObject\",\n\t \"inLanguage\": \"en-US\",\n\t \"@id\": \"http:\/\/localhost:10003\/#\/schema\/person\/image\/\",\n\t \"url\": \"http:\/\/2.gravatar.com\/avatar\/b8c0eda5a49f8f31ec32d0a0f9d6f838?s=96&d=mm&r=g\",\n\t \"contentUrl\": \"http:\/\/2.gravatar.com\/avatar\/b8c0eda5a49f8f31ec32d0a0f9d6f838?s=96&d=mm&r=g\",\n\t \"caption\": \"Panther\"\n\t },\n\t \"sameAs\": [\n\t \"http:\/\/localhost:10003\"\n\t ],\n\t \"url\": \"http:\/\/localhost:10003\/author\/pepethefrog\/\"\n\t }\n\t ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Create a Weather App with Kotlin and Android - Pantherax Blogs","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/","og_locale":"en_US","og_type":"article","og_title":"How to Create a Weather App with Kotlin and Android","og_description":"In this tutorial, we will learn how to create a weather app using Kotlin and the Android platform. The app will fetch weather data from an API and display it in a user-friendly format. Prerequisites Before getting started, make sure you have the following: Android Studio installed on your machine. Continue Reading","og_url":"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/","og_site_name":"Pantherax Blogs","article_published_time":"2023-11-04T23:13:55+00:00","article_modified_time":"2023-11-05T05:48:28+00:00","author":"Panther","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Panther","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/#article","isPartOf":{"@id":"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/"},"author":{"name":"Panther","@id":"http:\/\/localhost:10003\/#\/schema\/person\/b63d816f4964b163e53cbbcffaa0f3d7"},"headline":"How to Create a Weather App with Kotlin and Android","datePublished":"2023-11-04T23:13:55+00:00","dateModified":"2023-11-05T05:48:28+00:00","mainEntityOfPage":{"@id":"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/"},"wordCount":486,"publisher":{"@id":"http:\/\/localhost:10003\/#organization"},"keywords":["\"Android Development\"","\"API Integration\"","\"Code Examples\"]","\"Functionality\"","\"Kotlin\"","\"mobile app development\"","\"User Interface Design\"","\"Weather Data\"","[\"Weather App\""],"inLanguage":"en-US"},{"@type":"WebPage","@id":"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/","url":"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/","name":"How to Create a Weather App with Kotlin and Android - Pantherax Blogs","isPartOf":{"@id":"http:\/\/localhost:10003\/#website"},"datePublished":"2023-11-04T23:13:55+00:00","dateModified":"2023-11-05T05:48:28+00:00","breadcrumb":{"@id":"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/localhost:10003\/how-to-create-a-weather-app-with-kotlin-and-android\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/localhost:10003\/"},{"@type":"ListItem","position":2,"name":"How to Create a Weather App with Kotlin and Android"}]},{"@type":"WebSite","@id":"http:\/\/localhost:10003\/#website","url":"http:\/\/localhost:10003\/","name":"Pantherax Blogs","description":"","publisher":{"@id":"http:\/\/localhost:10003\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/localhost:10003\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/localhost:10003\/#organization","name":"Pantherax Blogs","url":"http:\/\/localhost:10003\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/localhost:10003\/#\/schema\/logo\/image\/","url":"http:\/\/localhost:10003\/wp-content\/uploads\/2023\/11\/cropped-9e7721cb-2d62-4f72-ab7f-7d1d8db89226.jpeg","contentUrl":"http:\/\/localhost:10003\/wp-content\/uploads\/2023\/11\/cropped-9e7721cb-2d62-4f72-ab7f-7d1d8db89226.jpeg","width":1024,"height":1024,"caption":"Pantherax Blogs"},"image":{"@id":"http:\/\/localhost:10003\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"http:\/\/localhost:10003\/#\/schema\/person\/b63d816f4964b163e53cbbcffaa0f3d7","name":"Panther","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/localhost:10003\/#\/schema\/person\/image\/","url":"http:\/\/2.gravatar.com\/avatar\/b8c0eda5a49f8f31ec32d0a0f9d6f838?s=96&d=mm&r=g","contentUrl":"http:\/\/2.gravatar.com\/avatar\/b8c0eda5a49f8f31ec32d0a0f9d6f838?s=96&d=mm&r=g","caption":"Panther"},"sameAs":["http:\/\/localhost:10003"],"url":"http:\/\/localhost:10003\/author\/pepethefrog\/"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/posts\/3907"}],"collection":[{"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/comments?post=3907"}],"version-history":[{"count":1,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/posts\/3907\/revisions"}],"predecessor-version":[{"id":4643,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/posts\/3907\/revisions\/4643"}],"wp:attachment":[{"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/media?parent=3907"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/categories?post=3907"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/localhost:10003\/wp-json\/wp\/v2\/tags?post=3907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}