initialize and release 1.0.0

This commit is contained in:
unknown 2021-10-27 15:00:19 +07:00
commit 9cd71ca9f8
4 changed files with 196 additions and 0 deletions

21
LICENSE Normal file
View 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
View 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)
}
```

3
go.mod Normal file
View File

@ -0,0 +1,3 @@
module test.re/goduckgo
go 1.17

133
goduckgo.go Normal file

File diff suppressed because it is too large Load Diff