Closed sfishel18 closed 5 months ago
@fershad / @mrchrisadams here's my initial implementation, let me if this looks like a good direction and if so i'll polish it up and add more test cases
@fershad i think this is ready for an initial look from you. i plan to add additional tests for the new code paths, but want to make sure i'm on the right track.
a couple of specific things i wanted your feedback on:
if i understood your comments on the issue, a goal of this is to make the function signatures for the two check
functions consistent. i think it's possible to do that without breaking backwards compatibility, by doing introspection of the argument types. but the "overloaded" function signature is a little confusing, so i'd understand if you'd prefer to just go ahead and make a breaking change to the API.
from what i can tell, the local database only contains a list of string domain names, so it doesn't have enough information to return verbose responses. i put in logic to throw an exception if a local database is used in combination with the verbose
flag set.
checkVerbose
function to both hosting-node.js and hosting-api.jscheckVerbose
returns the entire payload from the api.thegreenwebfoundation.org endpointcheckVerbose
returns a dictionary of each domain mapped to its response payloadFixes #189