mirror of
https://github.com/minoplhy/duckduckgo-images-api.git
synced 2024-11-13 07:06:55 +00:00
initialize and release 1.0.0
This commit is contained in:
commit
9cd71ca9f8
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2021 Minoplhy
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
39
README.md
Normal file
39
README.md
Normal file
@ -0,0 +1,39 @@
|
||||
# DuckDuckGo-image-api
|
||||
|
||||
This project is Go adaptation of Python3 forked [duckduckgo-image-api](https://github.com/joeyism/duckduckgo-images-api) . I made this modules because this module will be need in my future project .
|
||||
|
||||
Contribution are always welcome
|
||||
|
||||
# How to use
|
||||
|
||||
Import
|
||||
|
||||
# Example Use Cases
|
||||
|
||||
#### Get Search Results
|
||||
```
|
||||
func main() {
|
||||
hunsen := goduckgo.Search(goduckgo.Query{Keyword: "duck"})
|
||||
fmt.Print(hunsen.Results)
|
||||
}
|
||||
|
||||
```
|
||||
#### Get Search Result Image
|
||||
```
|
||||
func main() {
|
||||
hunsen := goduckgo.Search(goduckgo.Query{Keyword: "duck"})
|
||||
for _, somtam := range hunsen.Results {
|
||||
// This Can be use with all hunsen.Results(or anything.Results depending on your goduckgo.Search)
|
||||
// e.g. Title or URL depending on what you want
|
||||
fmt.Println(somtam.Image)
|
||||
}
|
||||
}
|
||||
```
|
||||
#### Specific P and S
|
||||
```
|
||||
func main() {
|
||||
hunsen := goduckgo.Search(goduckgo.Query{Keyword: "duck", P: "1", S: "200"})
|
||||
fmt.Print(hunsen.Results)
|
||||
}
|
||||
|
||||
```
|
133
goduckgo.go
Normal file
133
goduckgo.go
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user