Skip to content

Commit

Permalink
#3 Fixed searching issue
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenCochell committed Mar 11, 2022
1 parent 12c97bd commit 92fa84d
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ The documentation for cursepy is still a work in progress!
The core content will remain the same,
but expect minor corrections and rephrasing.

# Introduction
# Introduction

cursepy allows you to interact with CurseForge,
which allows you to add, addons and files in a simple, easy to use format.
We offer easy entry points into certain CurseForge APIs and backbends.
We offer easy entry points into certain CurseForge APIs and backends.

Our goal is to be modular and heavily customizable for developers who
have very specific wants and needs, while also being simple and intuitive
Expand Down
2 changes: 1 addition & 1 deletion cursepy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@

# Define some metadata here:

__version__ = '1.1.2'
__version__ = '1.1.3'
__author__ = 'Owen Cochell'
2 changes: 1 addition & 1 deletion cursepy/classes/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SearchParam:
all search parameters in only one call.
"""

filter: Optional[str] = field(default=None) # Term to search for
searchFilter: Optional[str] = field(default=None) # Term to search for
index: Optional[int] = field(default=None) # Page of search results to view
pageSize: Optional[int] = field(default=None) # Number of items to display per page
gameVersion: Optional[int] = field(default=None) # Game version to use
Expand Down
2 changes: 1 addition & 1 deletion docs/source/advn/hand.rst
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ the formatted object:
Now, the object has the time attached to it.
You may be thinking, why not attach the time during the format
operation?
You defiantly can! There is nothing stopping you.
You definitely can! There is nothing stopping you.
But adding that instruction to every handler you plan to write
is redundant, and leads to unnecessary code.
If you make a master class for you handlers,
Expand Down
2 changes: 1 addition & 1 deletion docs/source/advn/intro.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ such as creating custom handlers.

This philosophy means that for people
who want to use cursepy for interacting with CF and nothing more
(which is 99% of people).
(which is 99% of people),
Cursepy will be simple and easy to use.
Handlers will be auto-loaded and high-level methods
will do and act as they are supposed to.
Expand Down
6 changes: 3 additions & 3 deletions docs/source/basic/collection.rst
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ method:
The 'SearchParam' objects contains the following values
for fine-tuning the search operation:

* filter - Value to search for
* searchFilter - Value to search for
* index - Page index to search under
* pageSize - Number of items to display per page
* gameVersion - Game version to search under
Expand All @@ -311,7 +311,7 @@ ____________________________

Most of these values are self-explanatory.

'filter' is the actual search term to search for.
'searchFilter' is the actual search term to search for.

'gameVersion' is the game version to search under.
This varies from game to game, and should be a string.
Expand Down Expand Up @@ -380,7 +380,7 @@ and print each name:
# Set the filter to 'test':
search.filter = 'test'
search.searchFilter = 'test'
# Iterate over ALL addons:
Expand Down
24 changes: 24 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,30 @@
Changelog
=========

1.1.3
=====

Bug Fixes
---------

* Fix search filtering issue

1.1.2
=====

Bug Fixes
---------

* Fix dictionary calling issue

1.1.1
=====

Bug Fixes
---------

* Fixed an issue with sub-modules not being included in distribution files

1.1.0
=====

Expand Down
8 changes: 8 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from cursepy import CurseClient

client = CurseClient()
search = client.get_search()
search.pageSize = 5
search.searchFilter = "witchery"
for i in client.search(432, client.ADDON_SEARCH, search):
print(i.name)

0 comments on commit 92fa84d

Please sign in to comment.