ankushs92 / Browscap4j

Finally a Java library for the Browscap project.
MIT License
10 stars 5 forks source link

Allow auto-update of csv file #15

Closed mmorel-35 closed 7 years ago

mmorel-35 commented 7 years ago

What do you think about the idea of auto update the csv file?

You can use the URLs to download the csv file and then check with a defined frequency the stored version (in the csv file) with the remote version.

http://browscap.org/stream?q=BrowsCapCSV http://browscap.org/version http://browscap.org/version-number

It's something that have been done for PHP ini file on (https://github.com/GaretJax/phpbrowscap)

ankushs92 commented 7 years ago

Probably.. Bit out of time these days so might not do it just yet. Maybe you can do it and send a pull request?

ankushs92 commented 7 years ago

If you do decide to proceed with it, we can add pass the value in the constructor like so:

final boolean autoUpdatable = true;
final Browscap browscap = new Browscap(PATH_TO_CSV_FILE,autoUpdatable);

This way, the developer using the API has freedom to choose to update the file.