Teaching myself API and I've got a question.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • notinmybackyard
    Confirmed User
    • Sep 2012
    • 3230

    #1

    Teaching myself API and I've got a question.

    I believe that the brain is a muscle and it needs to workout or it'll go soft. So, I'm trying to learn some new skills. OK, I've got a problem:

    What am I supposed to put in the address to field? They don't break down in the docs what they are looking for in the various fields.

    officially retired as of March 01 2018 but still fucking around and getting into shit.
  • ZTT
    Confirmed User
    • Apr 2019
    • 659

    #2
    If you're writing to the president (of America), the address you put is:

    Mr President
    The White House
    Washington

    If you're writing to Santy Claus, the address you put is:

    Mr Santy Claus
    Lapland
    The North Pole

    HTH
    __________________

    Comment

    • the_software_dev
      Confirmed User
      • Feb 2023
      • 56

      #3
      Since this seems to be related to crypto, and since the address is merely a string, maybe this is a blockchain address? They do validate it, so you have to follow a certain format. Look up for blockchain address formats. Don't think they expect a regular address

      Comment

      • dUbster
        So Fucking Banned
        • Aug 2021
        • 346

        #4
        address_to = '1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2' - this is an example btc address
        api_key = 'YOUR_API_KEY'

        # Construct the API request string
        api_url = f'https://api.example.com/address-to-service?api_key={api_key}&address_to={address_to}'

        # Make the API request using the constructed URL
        response = requests.get(api_url)

        # Process the API response
        # ... (code to handle the response)

        Comment

        • plsureking
          bored
          • Aug 2003
          • 4910

          #5
          why the hell wouldn't you post the link to the API docs? i've used hundreds of APIs. we can't guess what they want or which one you are using. i don't even see your endpoint in the image.

          i agree about use it or lose it. that's why i sit at my desk every day.



          #
          PornCMS / low cost paysite management with hosting

          Comment

          • CurrentlySober
            Too lazy to wipe my ass
            • Aug 2002
            • 38953

            #6
            Originally posted by plsureking
            i agree about use it or lose it. that's why i sit at my desk every day.
            Who is it that you are worried about, that you think they are going to steal your desk?

            A good security system, or a simple lock on the door, would free you up to do ther more fun stuff...


            👁️ 👍️ 💩

            Comment

            • plsureking
              bored
              • Aug 2003
              • 4910

              #7
              Originally posted by CurrentlySober
              Who is it that you are worried about, that you think they are going to steal your desk?

              A good security system, or a simple lock on the door, would free you up to do ther more fun stuff...
              my wife. she has the keys

              #
              PornCMS / low cost paysite management with hosting

              Comment

              • ZTT
                Confirmed User
                • Apr 2019
                • 659

                #8
                Originally posted by plsureking
                why the hell wouldn't you post the link to the API docs? i've used hundreds of APIs. we can't guess what they want or which one you are using. i don't even see your endpoint in the image.
                LOL I didn't even know there was an image. I thought he was just asking for help and completely forgetting to say what about.

                Now I've seen it, it's not much more help, but he's probably just trying to make a cryptocurrency price app using 'Postman', but using currency exchange code.

                Anyway, more importantly, fuck imgur. They haven't just deleted billions of images, they're also blocking loads of networks and ISPs.

                Anyone found a decent alternative that doesn't require sign up?
                __________________

                Comment

                • CurrentlySober
                  Too lazy to wipe my ass
                  • Aug 2002
                  • 38953

                  #9
                  I can help with any APIP's questions you may have, (infact, Im somewhat of an expert) but I dont know just API's - Sorry.


                  👁️ 👍️ 💩

                  Comment

                  • JesseQuinn
                    feeding the wolves
                    • Aug 2012
                    • 6635

                    #10
                    Originally posted by ZTT
                    Anyone found a decent alternative that doesn't require sign up?
                    nah, ask Rebel

                    he knows everything, but not in an uppity officious manner. if you ask nicely he might send you a wicked track too to brighten your day

                    as to the OP who finds this place 'useless' and thinks t'would be cool if the US essentially banned porn/adult, suspect this API is for his quality content sold via crypto

                    yay to a bright shiny day when none of us can monetize via cc. oh what a party that would bring

                    lol dude couldn't even figure out how to change his widgets without gfy input. it was RIGHT HERE

                    but Dubs was nice enough to spell it out

                    and he expects those hypothetical customers to use crypto?

                    like all of a sudden everyone is gonna get a crypto address?



                    @OP hope ya get a bunch a market share there! right now it's what? like 10% if that?


                    w/o cc we're kinda fucked. but he's "just fucking around" yet 'cares'...or doesn't. somewhat confusing, but it's aight

                    about the muscle thing...def use. but if been a while which I suspect it has been ya gotta ease into it to prevent injury caused by strain

                    start with picture puzzles and lots of hydration

                    ******

                    not ageist, my mom is is 77 and yesterday I asked her, during our daily call, what ya do today?

                    her: oh, you know, gathered up brush from the last storm, dug the plants into the beds outside I turned over a few weeks ago waiting for the last of the northern CA end of winter frosts, then took 'em out, planted em, watered 'em, pruned trees, vacuumed cuz I have a fellow tai chi instructor coming over Monday to go over new moves we want to introduce to class on Monday aft, now just sitting re-reading the book I rec'd for book club (MaddAddam), knitting a new shawl with kitten 'pon lap. you?


                    me: uh...jesus mother fucking christ I love you and not just cuz you're my moms

                    and actually like some of my music and is insightful and funny as fuck


                    OP, you still ok if we all lose access to cc? neither here nor there, just curious how much you care lol
                    throwing molotav cocktails at the precinct

                    Comment

                    • plsureking
                      bored
                      • Aug 2003
                      • 4910

                      #11
                      Originally posted by JesseQuinn
                      nah, ask Rebel

                      he knows everything, but not in an uppity officious manner. if you ask nicely he might send you a wicked track too to brighten your day

                      as to the OP who finds this place 'useless' and thinks t'would be cool if the US essentially banned porn/adult, suspect this API is for his quality content sold via crypto

                      yay to a bright shiny day when none of us can monetize via cc. oh what a party that would bring
                      i love this rant <3 gfy needs more

                      #
                      PornCMS / low cost paysite management with hosting

                      Comment

                      • JesseQuinn
                        feeding the wolves
                        • Aug 2012
                        • 6635

                        #12
                        Originally posted by plsureking
                        i love this rant <3 gfy needs more

                        #
                        not a rant but whatever

                        have a wicked day ya'll

                        PS that Atwood trilogy really good
                        throwing molotav cocktails at the precinct

                        Comment

                        • notinmybackyard
                          Confirmed User
                          • Sep 2012
                          • 3230

                          #13
                          Originally posted by plsureking
                          why the hell wouldn't you post the link to the API docs? i've used hundreds of APIs. we can't guess what they want or which one you are using. i don't even see your endpoint in the image.

                          i agree about use it or lose it. that's why i sit at my desk every day.



                          #
                          Because I'm a secretive dumb old fuck who often borders on being an idiot because of my personality. Here's the link : https://api.simpleswap.io/
                          officially retired as of March 01 2018 but still fucking around and getting into shit.

                          Comment

                          • notinmybackyard
                            Confirmed User
                            • Sep 2012
                            • 3230

                            #14
                            Originally posted by JesseQuinn

                            as to the OP who finds this place 'useless' and thinks t'would be cool if the US essentially banned porn/adult, suspect this API is for his quality content sold via crypto

                            You read very little of anything posted and comprehend even less. You're either a moron or stoned and I suspect most often it's both. All of your opinions stem from this social justice warrior woke bullshit and your sense of being owed something by society.


                            So just to make things very clear to you and anyone whom I might do business with.

                            Anyone who works for me/us gets paid! We pay on time, every time and without debate or re-negotiations. Plus porn talent always gets paid in cash on set, immediately after they sign the release and we have copies of their ID. Whatever the final outcome of the video, they go home with that money.

                            We're not Budweiser or Target. We're not obligated to participate in any one's social causes and we're not going to unless there's strong financial incentive. I've lived through the 60s and Ms. Jesse Quinn, you're a very poor imitation of a hippie.

                            As for this forum:

                            Most of my expertise is in business and production and not very technical. Never the less, I'm very very happy to pay it forward and be of help to others on this site when the opportunity presents itself. I'm old school so I don't need to like someone in order to be helpful.
                            officially retired as of March 01 2018 but still fucking around and getting into shit.

                            Comment

                            • JesseQuinn
                              feeding the wolves
                              • Aug 2012
                              • 6635

                              #15
                              hmm, pretty sure my level of reading comprehension is fairly high

                              as to being a moron, I wish. suspect life would be easier, or perhaps not. dunno


                              stoned? not yet, that's an end of the night thing


                              'social justice warrior'? I'm not American screamy nor do I consume media that I find divisive

                              I'm chilling in the Caribbean, working hard amongst fellow hard workers who worked even harder to get beyond that here

                              Seaga years: interesting history, look it up


                              you're just trying for a cheap shot cuz I support BLM TO for the reasons I posted in the basement


                              such a radical. please


                              ok...so you want a medal for paying performers in cash in real time?

                              how you plan to monetize with customers if you get your dream of illegality?

                              w/o cc's you don't think some of them might be wary of crypto? not like billion dollar scams over any of that

                              but yeah, I must be high. and what do I know being here when you were doing what?


                              PS none of those brands exist in my county. and no 7-11's. it's hopeless


                              love the track obv otherwise I wouldn't post it but the vid reminds me of the Santana lion album cover I totally do not have on my wall. the one with all the faces. I got it from my dad

                              pick out all the acts of kindness, it's fun






                              Originally posted by notinmybackyard
                              As for this forum:

                              Most of my expertise is in business and production and not very technical. Never the less, I'm very very happy to pay it forward and be of help to others on this site when the opportunity presents itself. I'm old school so I don't need to like someone in order to be helpful.

                              would be cool if you showed that, but there is no show only do

                              but yes, going forward w3schools, stackoverflow, good resources

                              start with not being a dick

                              honestly hope you have a wicked rest of your day
                              throwing molotav cocktails at the precinct

                              Comment

                              • sarettah
                                see you later, I'm gone
                                • Oct 2002
                                • 14336

                                #16
                                Originally posted by notinmybackyard
                                Because I'm a secretive dumb old fuck who often borders on being an idiot because of my personality. Here's the link : https://api.simpleswap.io/
                                yeah, the docs are important

                                no 2 apis are the same, some may be very similar but each is fairly unique to whatever function the api has

                                .
                                All cookies cleared!

                                Comment

                                • fris
                                  I have to go potty
                                  • Aug 2002
                                  • 55750

                                  #17
                                  ya also depends on language using to parse. each code will be different.
                                  Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


                                  Totally Free Templates

                                  Comment

                                  • pornmasta
                                    Too lazy to set a custom title
                                    • Jun 2006
                                    • 19819

                                    #18
                                    Energy builds America ;)

                                    Comment

                                    • dUbster
                                      So Fucking Banned
                                      • Aug 2021
                                      • 346

                                      #19
                                      Here you go

                                      Code:
                                      # Replace 'YOUR_API_KEY' with your actual API key
                                      api_key = 'YOUR_API_KEY'
                                      
                                      # Set the endpoint URL
                                      api_url = 'https://api.simpleswap.io/v1/'
                                      
                                      # Function to get the current Bitcoin exchange rate
                                      def get_btc_exchange_rate():
                                          endpoint = 'get_rate'
                                          currency_from = 'btc'
                                          currency_to = 'usd'
                                      
                                          # Construct the API request URL
                                          url = f'{api_url}{endpoint}?currency_from={currency_from}&currency_to={currency_to}'
                                      
                                          # Make the API request using the constructed URL
                                          response = requests.get(url, headers={'Api-Key': api_key})
                                      
                                          # Process the API response
                                          if response.status_code == 200:
                                              data = response.json()
                                              rate = data['rate']
                                              print(f'Current BTC exchange rate: {rate}')
                                          else:
                                              print(f'Error: {response.status_code}')
                                      
                                      # Function to swap Bitcoin for another cryptocurrency
                                      def swap_bitcoin(address_from, address_to, amount):
                                          endpoint = 'swap'
                                          currency_from = 'btc'
                                          currency_to = 'eth'
                                      
                                          # Construct the API request URL
                                          url = f'{api_url}{endpoint}'
                                      
                                          # Set the request payload
                                          payload = {
                                              'address_from': address_from,
                                              'address_to': address_to,
                                              'amount': amount,
                                              'currency_from': currency_from,
                                              'currency_to': currency_to
                                          }
                                      
                                          # Make the API request using the constructed URL and payload
                                          response = requests.post(url, headers={'Api-Key': api_key}, json=payload)
                                      
                                          # Process the API response
                                          if response.status_code == 200:
                                              data = response.json()
                                              transaction_id = data['transaction_id']
                                              print(f'Success! Transaction ID: {transaction_id}')
                                          else:
                                              print(f'Error: {response.status_code}')
                                      
                                      # Example usage
                                      address_from = 'YOUR_BITCOIN_ADDRESS'
                                      address_to = 'YOUR_ETHEREUM_ADDRESS'
                                      amount = 0.01
                                      
                                      get_btc_exchange_rate()
                                      swap_bitcoin(address_from, address_to, amount)

                                      Comment

                                      • plsureking
                                        bored
                                        • Aug 2003
                                        • 4910

                                        #20
                                        Originally posted by sarettah
                                        yeah, the docs are important

                                        no 2 apis are the same, some may be very similar but each is fairly unique to whatever function the api has

                                        .
                                        most of the time, no two versions of an API are the same either

                                        (i'm looking at you google anal! i still gotta convert a few hundred sites by July 1 )

                                        #
                                        PornCMS / low cost paysite management with hosting

                                        Comment

                                        Working...