Code Edge
Code Edge
  • 26
  • 17 722
Retrieve Bitcoin value in Java
Retrieve website data in Java application with Selenium dependencies. In an example I retrieve the current Bitcoin value from coingeco.com.
00:00 - Intro
00:12 - Application presentation
00:37 - Dependencies
01:00 - Implementation
07:19 - Application launch
07:50 - Outro
มุมมอง: 105

วีดีโอ

Currency converter in Java
มุมมอง 9Kปีที่แล้ว
The Java application that converts currency with latest rate using external API. Important update: API from the video has changed, please check the new API and source code. Content of this video: 00:00 - Intro 00:13 - Project creation 01:02 - Required dependencies 01:42 - User input 03:43 - HTTP request to external API 05:28 - HTTP response extraction 07:50 - Result calculation 08:14 - Applicat...

ความคิดเห็น

  • @rogerdoger303
    @rogerdoger303 4 หลายเดือนก่อน

    I think they changed the key words in the API... to quotes and source... in query string

    • @codeedge
      @codeedge 4 หลายเดือนก่อน

      Thanks, probably yes. I will add a comment to description that API could be changed.

  • @johnl8503
    @johnl8503 7 หลายเดือนก่อน

    Awesome! Have you heard of the AI image generator Realm AI Chrome Extension? You can create different characters of yourself and others as well. It looks really good and real! I had fun using it, you should try it out. 😊

  • @zaidmalik8859
    @zaidmalik8859 8 หลายเดือนก่อน

    I did everything as you did But it shows: Exception in the thread "main" org.json.JSONExecption:JSONObject["rates"] not found.

    • @codeedge
      @codeedge 8 หลายเดือนก่อน

      It looks like jsonObject created from response doesn't contain rates object. You can check how jsonObject looks like through System.out.println(). If it looks non standard maybe returned response from external API is not proper.

    • @zaidmalik8859
      @zaidmalik8859 8 หลายเดือนก่อน

      @@codeedge I can't use the api ,which you used

    • @codeedge
      @codeedge 8 หลายเดือนก่อน

      I see that API has changed since I created this program. I think you need to get free API token to make a request. Also json response structure looks different. Please see exchangerate.host/documentation.

    • @ediomoeffiong
      @ediomoeffiong 2 หลายเดือนก่อน

      @@codeedge Hello, I just subscribed and I like this video. Please can you provide the correct JSON structure? (How we'll add the code or can you update the code on your github?)

    • @codeedge
      @codeedge 2 หลายเดือนก่อน

      I will try to find some time to upgrade the github repo. I will let you know when it's ready.

  • @zaidmalik8859
    @zaidmalik8859 8 หลายเดือนก่อน

    How to get Object.json file

    • @codeedge
      @codeedge 8 หลายเดือนก่อน

      In the line: JSONObject jsonObject = new JSONObject(stringResponse); you finally get json object. If you want to generate json file you could try this: FileWriter fileWriter = new FileWriter("D:/fileName.json"); //use your custom path fileWriter.write(jsonObject.toJSONString()); fileWriter.close();

  • @humblew33b66
    @humblew33b66 10 หลายเดือนก่อน

    Can I get source code pls

    • @codeedge
      @codeedge 10 หลายเดือนก่อน

      I added source code in the video description.

  • @surya691
    @surya691 10 หลายเดือนก่อน

    Which framework dod you use??

    • @codeedge
      @codeedge 10 หลายเดือนก่อน

      I just used 2 libraries: OkHttp and Json. Links in the description.

  • @kanayochiokeke6635
    @kanayochiokeke6635 10 หลายเดือนก่อน

    When I create the class I get an error saying that the package come is already in another module

    • @codeedge
      @codeedge 10 หลายเดือนก่อน

      From the description I assume that you have 2 modules in the project with the same package name. Modules identify classes inside src directory. In this case they don't know which package class is reffered to. Try to rename package.

  • @shy4real
    @shy4real 10 หลายเดือนก่อน

    this is by far the most legit java currency converter in terms of using api tutorial ive seen on youtube, thnx my guy mad underrated +1

    • @shy4real
      @shy4real 10 หลายเดือนก่อน

      yo update: im getting this error: (pls dont judge bro im new to integrating apis in java) Exception in thread "main" org.json.JSONException: JSONObject["rates"] not found. at org.json.JSONObject.get(JSONObject.java:570) at org.json.JSONObject.getJSONObject(JSONObject.java:780) at bsitCurrencyConverter.CurrencyConverter.main(CurrencyConverter.java:40)

    • @codeedge
      @codeedge 10 หลายเดือนก่อน

      Don't worry 😅 it looks like jsonObject created from response doesn't contain rates object. You can check how jsonObject looks like through System.out.println(). If it looks non standard maybe returned response from external API is not proper.

  • @rafawaowski753
    @rafawaowski753 ปีที่แล้ว

    Are you from Poland? You sound like you are from Poland ;)

    • @codeedge
      @codeedge ปีที่แล้ว

      Tak jest, pozdrawiam :) It's hard to avoid Polish accent.

  • @swaranjithgudelli3472
    @swaranjithgudelli3472 ปีที่แล้ว

    On which platform you wrote this code

    • @codeedge
      @codeedge ปีที่แล้ว

      If you are asking about which IDE I used, it was Intellij IDEA.

  • @sairam-xg6eu
    @sairam-xg6eu ปีที่แล้ว

    Put the json jsg

    • @codeedge
      @codeedge ปีที่แล้ว

      Hi, you can find json on full video th-cam.com/video/cRDAx0RxTMM/w-d-xo.htmlsi=2MZ67M0hlGfjMeQ4. It is shown at the time 6:49.

  • @prashantjannu2652
    @prashantjannu2652 ปีที่แล้ว

    excellent!! Very helpful 👍

    • @codeedge
      @codeedge ปีที่แล้ว

      Thanks, I'm glad!

  • @aleksandrak7622
    @aleksandrak7622 ปีที่แล้ว

    Thank you, that's what I was looking for!

  • @GerhardMunro-dv2fs
    @GerhardMunro-dv2fs ปีที่แล้ว

    Thanks so much, please do a few more!

    • @codeedge
      @codeedge ปีที่แล้ว

      Thanks, I will make more videos like this.

  • @alphonsealexander
    @alphonsealexander ปีที่แล้ว

    Is fmt a library or am just tripping

    • @TheSatyrical
      @TheSatyrical ปีที่แล้ว

      Yes, it's part of the standard library