Skip to content

Forum

learning API's
 
Notifications
Clear all

learning API's

22 Posts
4 Users
6 Likes
117 Views
(@albert-from-holland)
Posts: 2
New Member
Points: 16
Topic starter
 

What is the best and fastest way to learn all about APIs? Tips are appreciated 🙂 

 
Posted : 24/05/2023 5:45 pm
Topic Tags
api
SSAdvisor
(@ssadvisor)
Posts: 38
Trusted Member
Points: 105
 

Pick a website, I'll use Facebook as an example, then go to a search engine and search for "API Facebook Documentation".

Then study the API and play with it in your code editor.

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
https://linktr.ee/earnieboyd/

 
Posted : 24/05/2023 6:33 pm
(@admin)
Posts: 50
Member Admin
Premium Member
Points: 107
 

Are you looking to learn about building APIs (programming) ? or selling APIs? No-code APIs? or everything!

I have a full course coming soon. But for now, you can start with the following:

 
Posted : 25/05/2023 9:00 am
(@albert-from-holland)
Posts: 2
New Member
Points: 16
Topic starter
 

@admin Thanks for the tips! i just want to build api's to automate my marketing work 🙂 We got a lot a customer data in Salesforce and i want to use i to make my work easier. Your tutorials to build programs with python and openai are very helpfull, and i'm now building an api with Xano. Looking forward for your api course 👍

 
Posted : 25/05/2023 5:42 pm
(@admin)
Posts: 50
Member Admin
Premium Member
Points: 107
 

@albert-from-holland Thank you too 🙂

 
Posted : 26/05/2023 1:13 pm
(@abdirahman)
Posts: 8
Active Member
Points: 29
 

how to make api which can change image to text using fastapi

This post was modified 2 weeks ago by abdirahman
 
Posted : 27/05/2023 4:06 pm
(@admin)
Posts: 50
Member Admin
Premium Member
Points: 107
 

@abdirahman Friend, this question requires a full tutorial. please tell me what is your coding background to help you where to start

 
Posted : 28/05/2023 7:48 am
(@abdirahman)
Posts: 8
Active Member
Points: 29
 

@admin I know some coding about python and fastai framework

 
Posted : 28/05/2023 2:38 pm
SSAdvisor
(@ssadvisor)
Posts: 38
Trusted Member
Points: 105
 

@abdirahman Does

Posted by: @abdirahman
know some coding
mean you've practiced it or just read about it? If you've practiced it do you have examples of your coding to get an understanding of what you know?

 

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
https://linktr.ee/earnieboyd/

 
Posted : 28/05/2023 7:17 pm
(@abdirahman)
Posts: 8
Active Member
Points: 29
 

@ssadvisor Yeah I have this example

from fastapi import FastAPI, UploadFile, File
import pytesseract
from PIL import Image
import io

pytesseract.pytesseract.tesseract_cmd = r'E:\\Program Files\\Tesseract-OCR\\tesseract.exe'

app = FastAPI()

@app.post("/image-to-text")
async def image_to_text(image: UploadFile = File(...)):
    image_data = await image.read()
    image = Image.open(io.BytesIO(image_data))

    text = pytesseract.image_to_string(image)
    return {"text": text}
 
Posted : 29/05/2023 5:41 am
(@admin)
Posts: 50
Member Admin
Premium Member
Points: 107
 

@abdirahman I see you are using an OCR external executable to do this. where are you stuck, what is the problem?

 
Posted : 29/05/2023 7:46 am
(@abdirahman)
Posts: 8
Active Member
Points: 29
 

@admin the problem is the API can't produce a good result at any time, I mean when I try to change some images it is not working.

 
Posted : 29/05/2023 5:56 pm
(@admin)
Posts: 50
Member Admin
Premium Member
Points: 107
 

@abdirahman in which languages?

if the problem is in the API itself, then I dont think you can doo much, it is better to think about another approach. I didn't test this API before.

 
Posted : 30/05/2023 10:11 am
(@abdirahman)
Posts: 8
Active Member
Points: 29
 

@admin thanks hasan

 
Posted : 31/05/2023 6:39 am
SSAdvisor
(@ssadvisor)
Posts: 38
Trusted Member
Points: 105
 

What is the JSON result you get when you call the API? Also, how are you specifying the file to open?

Regards,
Earnie Boyd, CEO
Seasoned Solutions Advisor LLC
https://linktr.ee/earnieboyd/

 
Posted : 31/05/2023 6:17 pm
(@abdirahman)
Posts: 8
Active Member
Points: 29
 

I made Instagram downloader API and I used instaloader library then I deployed render and when I try to test I got this error:

{
  "error": "JSON Query to graphql/query: HTTP error code 401."
}
download (29)

 this is the how i wrote the code

from fastapi import FastAPI
import instaloader

app = FastAPI()

L = instaloader.Instaloader()
@app.get("/posts-reels-stories-igtv")
async def download_post(link: str = "https://www.instagram.com/p/Cs3leViPf63/?utm_source=ig_web_copy_link&igshid=MzRlODBiNWFlZA"):
    try:
        post = instaloader.Post.from_shortcode(L.context, link.split("/")[-2])
        L.download_post(post, target="./download")
        return {"message": "Post downloaded successfully!"}
    except Exception as e:
        return {"error": str(e)}

 

 
Posted : 04/06/2023 6:13 am
(@admin)
Posts: 50
Member Admin
Premium Member
Points: 107
 

@abdirahman did you try running the code without using  fast api, just a simple script?

 
Posted : 04/06/2023 7:15 am
(@abdirahman)
Posts: 8
Active Member
Points: 29
 

@admin I tried with fastAPI and it is working well but when I deploy it to render hosting it is not working.

 
Posted : 04/06/2023 8:45 am
(@admin)
Posts: 50
Member Admin
Premium Member
Points: 107
 

401 code is related to authorization, do you have any authorizations options on the hosting server?

 
Posted : 04/06/2023 12:25 pm
(@abdirahman)
Posts: 8
Active Member
Points: 29
 

@admin no 🤔

 
Posted : 04/06/2023 12:53 pm
Page 1 / 2
Share:
Take Your Digital Marketing Skills To The Next Level

© 2023 LearnWithHasan | All Rights Reserved.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.