Giter VIP home page Giter VIP logo

Comments (11)

innoventry avatar innoventry commented on June 11, 2024 1

You need to percentEncode the date string before setting that as parameter value.
params.put( "after", OAuthSignature.percentEncode( "2019-11-16T15:02:30" ) );

from wc-api-java.

ngocnd0242 avatar ngocnd0242 commented on June 11, 2024

@lucasmoriita I faced same as your issue, Have you fixed it? Could you help me fix it?

from wc-api-java.

ngocnd0242 avatar ngocnd0242 commented on June 11, 2024

I'm trying to get the newest order after the time ISO8061 point...

from wc-api-java.

ngocnd0242 avatar ngocnd0242 commented on June 11, 2024

@innoventry I took two days and I gave up and I changed my project to use laravel framework

from wc-api-java.

ngocnd0242 avatar ngocnd0242 commented on June 11, 2024

someday, If I use java again, I will try it

from wc-api-java.

ngocnd0242 avatar ngocnd0242 commented on June 11, 2024

@lucasmorita Please try it.

from wc-api-java.

lucasmorita avatar lucasmorita commented on June 11, 2024

@ngocnd0242 Sorry for the delay in responding.
Actually, I gave up too, and it's been a while since I don't even touch at the code. But, as a workaround, I've decided to use OkHttp to make the requests as a workaround 😄

from wc-api-java.

shakila-rajaiah avatar shakila-rajaiah commented on June 11, 2024

You need to percentEncode the date string before setting that as parameter value. params.put( "after", OAuthSignature.percentEncode( "2019-11-16T15:02:30" ) );

This does not work as well.

from wc-api-java.

ngocnd0242 avatar ngocnd0242 commented on June 11, 2024

@shakila-rajaiah you try it https://gist.github.com/JakeWharton/f26f19732f0c5907e1ab I think you should write reset + oauth1 yourself, I used by chilkat, It's works fine

WooCkRest rest = new WooCkRest();
        OrderEntity newOrder = orderRepository.findFirstByStatusOrderByDateCreatedDesc(OrderStatus.NEW.getVal());
        if (Objects.nonNull(newOrder)) {
            rest.AddQueryParam("after", newOrder.getDateCreatedOriginal());
        } else {
            OrderEntity checkedOrder = orderRepository.findFirstByStatusOrderByDateCreatedDesc(OrderStatus.CHECKED.getVal());
            if (Objects.nonNull(checkedOrder)) {
                rest.AddQueryParam("after", checkedOrder.getDateCreatedOriginal());
            }
        }
        rest.AddQueryParam("per_page", "100");

        rest.SetAuthOAuth1(oauth1, true);
        boolean success = rest.Connect(url, url.contains("https") ? 443 : 80, false, true);
        if (success != true) {
            log.error("rest.Connect" + rest.lastErrorText());
            return null;
        }

from wc-api-java.

Jookus avatar Jookus commented on June 11, 2024

Pull request #37 fixed it for me

from wc-api-java.

lucasmorita avatar lucasmorita commented on June 11, 2024

Closing issue as it is fixed by #37

from wc-api-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.