Giter Site home page Giter Site logo

workaround .env file about phoneinfoga HOT 8 CLOSED

g4ze avatar g4ze commented on May 28, 2024
workaround .env file

from phoneinfoga.

Comments (8)

sundowndev avatar sundowndev commented on May 28, 2024

Hi @g4ze, this could be solved by the introduction of scanner options which is basically adding support for optional parameters for existing scanners. This could be quickly implemented without breaking change and used through the API like this:

curl -X 'POST' \
  'http://localhost:5000/api/v2/scanners/numverify/run' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"number": "33679368229", "options": {"api_key": "secret"}}'

If it's not specified, the environment variable is used. Could you confirm that this would solve your case?
Thanks

from phoneinfoga.

g4ze avatar g4ze commented on May 28, 2024

Thanks for the attention! So you basically you mean that we'd need change https://github.com/sundowndev/phoneinfoga/cmd/scan.go
a bit, in a way to have ScanCmdOptions struct include another variable? I'm not too fluent with golang but maybe i can try to raise a PR and add the functionality if you like.
And yes the addition of optional parameters for existing scanners, and using it through the way you mentioned would solve my use case.

from phoneinfoga.

sundowndev avatar sundowndev commented on May 28, 2024

No I'm talking about the REST API only, not the command line. If I understand correctly, you plan to integrate phoneinfoga in your project by using the REST API, is that right?

For this we'll need to change the scanner interface here to accept those options. If this can wait a week or so I can take care of the changes.

from phoneinfoga.

g4ze avatar g4ze commented on May 28, 2024

my bad. yes, you understood our problem well. We can wait a week or so. Please keep us updated for the same.

from phoneinfoga.

sundowndev avatar sundowndev commented on May 28, 2024

@g4ze I just released v2.11.0 which contain this new feature. Please give it a try and send us feedback. Read docs here.

from phoneinfoga.

g4ze avatar g4ze commented on May 28, 2024

works as requested, thankyou very much

from phoneinfoga.

sundowndev avatar sundowndev commented on May 28, 2024

Cool! After reviewing your PR, I suggest that you use a fixed docker tag, instead of using the latest tag (here) because it could lead to breaking change when we release v3 for example. You can use the v2 tag as well.

Anyway, I can close this one.

from phoneinfoga.

g4ze avatar g4ze commented on May 28, 2024

hmm, makes sense. Thankyou for the suggestion :3 !

from phoneinfoga.

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.