diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..1dcb9fd --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,70 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +education, socio-economic status, nationality, personal appearance, race, +religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at {{ email }}. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +> This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html) Code of Conduct. diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 0000000..287c1bf --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,36 @@ +# How to contribute to this module + +> Please note: As a loose rule any pull requests for general code cleanup will generally be merged when a new version is released. I have a limited number of hours per week to review and test pull requests. I will do my best to test pull requests within a reasonable time frame, but no guarantees can be made. + +## **Did you find a bug?** + +* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/Celerium/PokeAPI/issues). + +* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/Celerium/PokeAPI/issues/new/choose). + * Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring. + +## **Did you write a patch that fixes a bug?** + +* [ ] Submit a pull request to the **dev** branch +* [ ] Ensure the pull request description clearly describes the problem and solution. + +If the feature is accepted and I have time to test, the pull request will be approved. + +## **Do you intend to add a new feature or change an existing one?** + +* Suggest your change by creating a GitHub issue tagged with "Enhancement" + +* Create a branch and start working on your new feature, following feedback from the community. + +* Once the new feature is ready, + + * [ ] Update any documentation if needed + * [ ] Submit a pulling request to the **development** branch + +If the feature is accepted and I have time to test, the pull request will be approved. + +Thanks! :heart: + +--- + +> Based off of the Ruby on Rails project [contribution guide](https://github.com/rails/rails/blob/master/CONTRIBUTING.md). diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..de0fa1b --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +custom: 'https://www.buymeacoffee.com/Celerium' diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..a4e824e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,88 @@ +name: 🐛 Bug Report +description: File a bug report to help us improve +title: "[Bug]: " +labels: ["type: bug"] +assignees: + - Celerium +body: + - type: markdown + attributes: + value: | + Thank you for taking the time to fill out this bug report! + - type: textarea + id: what-happened + attributes: + label: What happened? + placeholder: Tell us what you see! + value: "A bug happened!" + validations: + required: true + - type: textarea + id: ExpectedBehavior + attributes: + label: Expected behavior? + placeholder: Tell us what you see! + value: "A bug shouldn't have happened!" + validations: + required: true + - type: textarea + id: PossibleSolution + attributes: + label: Possible Solution? + validations: + required: false + - type: dropdown + id: PowerShellVersion + attributes: + label: PowerShell Version + description: What version of PowerShell are you running? + options: + - 5.1 - (PowerShell) + - 7.2.x - (PowerShell Core) + - 7.3.x - (PowerShell Core) + - 7.4.x - (PowerShell Core) + - type: dropdown + id: OperatingSystem + attributes: + label: What operating system are you seeing the problem on? + multiple: true + options: + - Windows + - Linux - Ubuntu\Debian + - Linux - CentOS\RedHat\Fedora + - Linux - openSUSE + - macOS + - type: textarea + id: logs + attributes: + label: Relevant log output + description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. + render: PowerShell + - type: textarea + id: HelpCommands + attributes: + label: Help Commands + description: Please share additional details about your environment. + value: "$PSversionTable + + Get-Package -Name xxxModuleNamexxx | Select-Object Name,Version,Source,ProviderName + + Get-ComputerInfo -Property @( + 'OsName', + 'OsVersion', + 'OsOperatingSystemSKU', + 'OSArchitecture', + 'WindowsVersion', + 'WindowsBuildLabEx', + 'OsLanguage', + 'OsMuiLanguages' + )" + render: PowerShell + - type: checkboxes + id: terms + attributes: + label: Code of Conduct + description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/Celerium/PokeAPI/blob/main/.github/CODE_OF_CONDUCT.md) + options: + - label: I agree to follow this project's Code of Conduct + required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..c318c29 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: true +contact_links: + - name: Project Documentation + url: https://celerium.github.io/PokeAPI/ + about: Read through the generated documentation + - name: Vendor Documentation + url: https://github.com/Celerium + about: Read through the vendors documentation + - name: Celerium.org + url: https://celerium.org + about: Website were I publish more information related to this project. diff --git a/.github/ISSUE_TEMPLATE/documentation_request.yml b/.github/ISSUE_TEMPLATE/documentation_request.yml new file mode 100644 index 0000000..240fe27 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation_request.yml @@ -0,0 +1,40 @@ +name: 📝 Documentation Request +description: Suggest extra documentation for this project +title: "[Documentation Request]: " +labels: ["type: documentation"] +assignees: + - Celerium +body: + - type: checkboxes + id: ReadME + attributes: + label: Project README + description: "[Project README](https://github.com/Celerium/xxxREPONAMExxx/blob/main/README.md)" + options: + - label: "Have you read the projects README?" + - type: checkboxes + id: WebDocumentation + attributes: + label: Online Documentation + description: "[Online Documentation](https://Celerium.github.io/xxxREPONAMExxx/)" + options: + - label: "Have you read the online documentation" + - type: checkboxes + id: PowerShellHelp + attributes: + label: PowerShell Help + description: "Get-Help Get-xxxModulePrefixxxx -Full" + options: + - label: "Have you read the help output?" + - type: textarea + id: DocumentationRequest + attributes: + label: Documentation Request + description: What would you like to see more documentation around? + render: Text + - type: textarea + id: ExistingIssue + attributes: + label: Existing Issue? + description: Is this related to an existing issue? If so please describe or link. + value: "Issue: #12345" \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 0000000..b8e83da --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,46 @@ +name: 🚀 Feature Request +description: Suggest a new feature for this project +title: "[Feature Request]: " +labels: ["type: feature request"] +assignees: + - Celerium +body: + - type: checkboxes + id: ReadME + attributes: + label: Project README + description: "[Project README](https://github.com/Celerium/xxxREPONAMExxx/blob/main/README.md)" + options: + - label: "Have you read the projects README?" + - type: checkboxes + id: WebDocumentation + attributes: + label: Online Documentation + description: "[Online Documentation](https://Celerium.github.io/xxxREPONAMExxx/)" + options: + - label: "Have you read the online documentation" + - type: checkboxes + id: PowerShellHelp + attributes: + label: PowerShell Help + description: "Get-Help Get-xxxModulePrefixxxx -Full" + options: + - label: "Have you read the help output?" + - type: textarea + id: NewFeature + attributes: + label: Describe the solution you'd like + description: A clear and concise description of what you want to happen. + render: Text + - type: textarea + id: NewFeatureAlternatives + attributes: + label: Describe alternatives you've considered + description: A clear and concise description of any alternative solutions or features you've considered. + render: Text + - type: textarea + id: ExistingIssue + attributes: + label: Existing Issue? + description: Is this related to an existing issue? If so please describe or link. + value: "Issue: #12345" \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/help_request.yml b/.github/ISSUE_TEMPLATE/help_request.yml new file mode 100644 index 0000000..1f9928f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/help_request.yml @@ -0,0 +1,40 @@ +name: 👋 Help Request +description: What can the community help with +title: "[Help Request]: " +labels: ["help wanted"] +assignees: + - Celerium +body: + - type: checkboxes + id: ReadME + attributes: + label: Project README + description: "[Project README](https://github.com/Celerium/xxxREPONAMExxx/blob/main/README.md)" + options: + - label: "Have you read the projects README?" + - type: checkboxes + id: WebDocumentation + attributes: + label: Online Documentation + description: "[Online Documentation](https://Celerium.github.io/xxxREPONAMExxx/)" + options: + - label: "Have you read the online documentation" + - type: checkboxes + id: PowerShellHelp + attributes: + label: PowerShell Help + description: "Get-Help Get-xxxModulePrefixxxx -Full" + options: + - label: "Have you read the help output?" + - type: textarea + id: HelpRequest + attributes: + label: Help Request + description: What would you like help with? + render: Text + - type: textarea + id: ExistingIssue + attributes: + label: Existing Issue? + description: Is this related to an existing issue? If so please describe or link. + value: "Issue: #12345" \ No newline at end of file diff --git a/.github/SECURITY.md b/.github/SECURITY.md new file mode 100644 index 0000000..8576595 --- /dev/null +++ b/.github/SECURITY.md @@ -0,0 +1,32 @@ +# Responsible Security Disclosure README standard + +## Our security policy and Your responsibility + +- **POLICY**: + +*Our security policy is to avoid leaving the ecosystem worse than we found it. Meaning we are not planning to introduce vulnerabilities into the ecosystem.* + +The "PokeAPI" team and community take all security bugs in "PokeAPI" seriously. Thank you for improving the security of "PokeAPI". We appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions. + +Report security bugs by emailing the lead maintainer at [celerium@celerium.org] and include the word "SECURITY" in the subject line.. + +The lead maintainer will acknowledge your email within a week, and will send a more detailed response 48 hours after that indicating the next steps in handling your report. After the initial reply to your report, the security team will endeavor to keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance. + +- "PokeAPI" will confirm the problem and determine the affected versions. +- "PokeAPI" will audit code to find any potential similar problems. +- "PokeAPI" will prepare fixes for all releases still under maintenance. These fixes will be released as fast as possible. + +Report security bugs in third-party modules to the person or team maintaining the module. + +- **SECURITY DISCLOSURE**: + +*Your responsibility is to report vulnerabilities to us using the guidelines outlined below.* + +Discuss how someone should disclose a vulnerability to "PokeAPI", in tl;dr ( or ELI5 ) language. Then expand on this with "How To Disclose a vulnerability in detail". Please give detailed steps on how to disclose the vulnerability. Keep these OWASP guidelines in mind ( ) when creating your disclosure policy. Below are some recommendations for security disclosures: + +- "PokeAPI" security contact { contact: mailto:[celerium@celerium.org] } +- Disclosure format: When disclosing vulnerabilities please + 1. Your name and affiliation (if any). + 2. include scope of vulnerability. Let us know who could use this exploit. + 3. document steps to identify the vulnerability. It is important that we can reproduce your findings. + 4. how to exploit vulnerability, give us an attack scenario. diff --git a/.github/azure-pipelines.yml b/.github/azure-pipelines.yml new file mode 100644 index 0000000..7ff309c --- /dev/null +++ b/.github/azure-pipelines.yml @@ -0,0 +1,208 @@ +trigger: +- main + +pool: + vmImage: ubuntu-latest + +variables: + version: 2.1.0 + moduleName: PokeAPI + +jobs: + +# Windows - nonCore + + - job: Window_PowerShell + timeoutInMinutes: 10 + pool: + vmImage: 'windows-latest' + + steps: + - task: PowerShell@2 + displayName: Install-Prerequisites + name: InstallPrerequisites + inputs: + pwsh: false + targetType: filePath + filePath: $(Build.SourcesDirectory)/build/Install-Prerequisites.ps1 + + - task: PowerShell@2 + displayName: Build Documentation__Invoke-helpContent + name: BuildDocumentation + inputs: + pwsh: false + targetType: filePath + filePath: $(Build.SourcesDirectory)/build/Invoke-helpContent.ps1 + arguments: -Verbose + + - task: PowerShell@2 + displayName: Build Module__Invoke-moduleBuild + name: BuildModule + inputs: + pwsh: false + targetType: filePath + filePath: $(Build.SourcesDirectory)/build/Invoke-moduleBuild.ps1 + arguments: -version $(version) + + - task: PowerShell@2 + displayName: Testing__Invoke-pesterTests + name: PesterTests + inputs: + pwsh: false + targetType: filePath + filePath: $(Build.SourcesDirectory)/build/Invoke-pesterTests.ps1 + arguments: -version $(version) -buildTarget built + + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact + name: PublishArtifact + inputs: + ArtifactName: $(moduleName)-$(version) + PathtoPublish: $(Build.SourcesDirectory)/build/$(moduleName)/$(version) + +# Windows - Core + + - job: Window_PowerShell_Core + timeoutInMinutes: 10 + pool: + vmImage: 'windows-latest' + + steps: + - task: PowerShell@2 + displayName: Install-Prerequisites + name: InstallPrerequisites + inputs: + pwsh: true + targetType: filePath + filePath: $(Build.SourcesDirectory)/build/Install-Prerequisites.ps1 + + - task: PowerShell@2 + displayName: Build Documentation__Invoke-helpContent + name: BuildDocumentation + inputs: + pwsh: true + targetType: filePath + filePath: $(Build.SourcesDirectory)/build/Invoke-helpContent.ps1 + + - task: PowerShell@2 + displayName: Build Module__Invoke-moduleBuild + name: BuildModule + inputs: + pwsh: true + targetType: filePath + filePath: $(Build.SourcesDirectory)/build/Invoke-moduleBuild.ps1 + arguments: -version $(version) + + - task: PowerShell@2 + displayName: Testing__Invoke-pesterTests + name: PesterTests + inputs: + pwsh: true + targetType: filePath + filePath: $(Build.SourcesDirectory)/build/Invoke-pesterTests.ps1 + arguments: -version $(version) -buildTarget built + + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact + name: PublishArtifact + inputs: + ArtifactName: $(moduleName)-$(version) + PathtoPublish: $(Build.SourcesDirectory)/build/$(moduleName)/$(version) + +# Linux - Ubuntu + + - job: Ubuntu + timeoutInMinutes: 10 + pool: + vmImage: 'ubuntu-latest' + + steps: + - task: PowerShell@2 + displayName: Install-Prerequisites + name: InstallPrerequisites + inputs: + pwsh: true + targetType: filePath + filePath: $(Build.SourcesDirectory)/build/Install-Prerequisites.ps1 + + - task: PowerShell@2 + displayName: Build Documentation__Invoke-helpContent + name: BuildDocumentation + inputs: + pwsh: true + targetType: filePath + filePath: $(Build.SourcesDirectory)/build/Invoke-helpContent.ps1 + + - task: PowerShell@2 + displayName: Build Module__Invoke-moduleBuild + name: BuildModule + inputs: + pwsh: true + targetType: filePath + filePath: $(Build.SourcesDirectory)/build/Invoke-moduleBuild.ps1 + arguments: -version $(version) + + - task: PowerShell@2 + displayName: Testing__Invoke-pesterTests + name: PesterTests + inputs: + pwsh: true + targetType: filePath + filePath: $(Build.SourcesDirectory)/build/Invoke-pesterTests.ps1 + arguments: -version $(version) -buildTarget built + + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact + name: PublishArtifact + inputs: + ArtifactName: $(moduleName)-$(version) + PathtoPublish: $(Build.SourcesDirectory)/build/$(moduleName)/$(version) + +# Linux - macOS + + - job: macOS + timeoutInMinutes: 10 + pool: + vmImage: 'macOS-latest' + + steps: + - task: PowerShell@2 + displayName: Install-Prerequisites + name: InstallPrerequisites + inputs: + pwsh: true + targetType: filePath + filePath: $(Build.SourcesDirectory)/build/Install-Prerequisites.ps1 + + - task: PowerShell@2 + displayName: Build Documentation__Invoke-helpContent + name: BuildDocumentation + inputs: + pwsh: true + targetType: filePath + filePath: $(Build.SourcesDirectory)/build/Invoke-helpContent.ps1 + + - task: PowerShell@2 + displayName: Build Module__Invoke-moduleBuild + name: BuildModule + inputs: + pwsh: true + targetType: filePath + filePath: $(Build.SourcesDirectory)/build/Invoke-moduleBuild.ps1 + arguments: -version $(version) + + - task: PowerShell@2 + displayName: Testing__Invoke-pesterTests + name: PesterTests + inputs: + pwsh: true + targetType: filePath + filePath: $(Build.SourcesDirectory)/build/Invoke-pesterTests.ps1 + arguments: -version $(version) -buildTarget built + + - task: PublishBuildArtifacts@1 + displayName: Publish Artifact + name: PublishArtifact + inputs: + ArtifactName: $(moduleName)-$(version) + PathtoPublish: $(Build.SourcesDirectory)/build/$(moduleName)/$(version) diff --git a/.github/images/Celerium_PoSHGallery_PokeAPI.pdn b/.github/images/Celerium_PoSHGallery_PokeAPI.pdn new file mode 100644 index 0000000..eb4184d Binary files /dev/null and b/.github/images/Celerium_PoSHGallery_PokeAPI.pdn differ diff --git a/.github/images/Celerium_PoSHGallery_PokeAPI.png b/.github/images/Celerium_PoSHGallery_PokeAPI.png new file mode 100644 index 0000000..e720921 Binary files /dev/null and b/.github/images/Celerium_PoSHGallery_PokeAPI.png differ diff --git a/.github/images/Celerium_PoSHGitHub_PokeAPI.pdn b/.github/images/Celerium_PoSHGitHub_PokeAPI.pdn new file mode 100644 index 0000000..cecbe01 Binary files /dev/null and b/.github/images/Celerium_PoSHGitHub_PokeAPI.pdn differ diff --git a/.github/images/Celerium_PoSHGitHub_PokeAPI.png b/.github/images/Celerium_PoSHGitHub_PokeAPI.png new file mode 100644 index 0000000..d50eedb Binary files /dev/null and b/.github/images/Celerium_PoSHGitHub_PokeAPI.png differ diff --git a/.github/images/Celerium_PokeAgentsReport.png b/.github/images/Celerium_PokeAgentsReport.png new file mode 100644 index 0000000..b45e79e Binary files /dev/null and b/.github/images/Celerium_PokeAgentsReport.png differ diff --git a/.github/images/Celerium_PokeDevicesReport.png b/.github/images/Celerium_PokeDevicesReport.png new file mode 100644 index 0000000..ca39ba9 Binary files /dev/null and b/.github/images/Celerium_PokeDevicesReport.png differ diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..e4c4b3e --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,35 @@ +# Pull Request + +## Description + +Please include a summary of any changes. Please also include relevant motivation and context. + +Fixes: #12345 + +Fixes: + +## Type of change + +Please delete options that are not relevant. + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) +- [ ] General code cleanup (non-breaking change which improves readability) + +## Checklist + +- [ ] I have reviewed the [Contributing](https://github.com/Celerium/PokeAPI/blob/main/.github/CONTRIBUTING.md) guide +- [ ] I am pulling to the **dev** branch +- [ ] I have performed a self-review of my own code +- [ ] I have commented my code, particularly in hard-to-understand areas +- [ ] I have made corresponding changes to the documentation +- [ ] I have added tests that prove my fix is effective or that my feature works +- [ ] New and existing unit tests pass locally with my changes + +## How Has This Been Tested? + +Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration + +- [ ] Test A +- [x] Test B diff --git a/.github/workflows/powershell-analysis.yml b/.github/workflows/powershell-analysis.yml new file mode 100644 index 0000000..bb168cc --- /dev/null +++ b/.github/workflows/powershell-analysis.yml @@ -0,0 +1,44 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# +# https://github.com/microsoft/action-psscriptanalyzer +# For more information on PSScriptAnalyzer in general, see +# https://github.com/PowerShell/PSScriptAnalyzer + +name: PSScriptAnalyzer + +on: + push: + branches: [ main, development ] + pull_request: + branches: [ main, development ] + #Runs every sunday at 22:36 + schedule: + - cron: '36 22 * * 0' + +jobs: + build: + name: PSScriptAnalyzer + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Run PSScriptAnalyzer + uses: microsoft/psscriptanalyzer-action@2044ae068e37d0161fa2127de04c19633882f061 + with: + # Check https://github.com/microsoft/action-psscriptanalyzer for more info about the options. + # The below set up runs PSScriptAnalyzer to your entire repository and runs some basic security rules. + path: .\ + recurse: true + # Include your own basic security rules. Removing this option will run all the rules + #includeRule: '"PSAvoidGlobalAliases", "PSAvoidUsingConvertToSecureStringWithPlainText"' + ExcludeRule: '"PSAvoidUsingWriteHost", "PSUseSingularNouns"' + output: results.sarif + + # Upload the SARIF file generated in the previous step + - name: Upload SARIF results file + uses: github/codeql-action/upload-sarif@v1 + with: + sarif_file: results.sarif diff --git a/LICENSE b/LICENSE index 6072933..1b25f9c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 David +Copyright (c) 2022 David Schulte Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/PokeAPI/PokeAPI.psd1 b/PokeAPI/PokeAPI.psd1 new file mode 100644 index 0000000..d4c68ea Binary files /dev/null and b/PokeAPI/PokeAPI.psd1 differ diff --git a/PokeAPI/PokeAPI.psm1 b/PokeAPI/PokeAPI.psm1 new file mode 100644 index 0000000..e69de29 diff --git a/PokeAPI/Private/apiCalls/ConvertTo-PokeQueryString.ps1 b/PokeAPI/Private/apiCalls/ConvertTo-PokeQueryString.ps1 new file mode 100644 index 0000000..7ad37c3 --- /dev/null +++ b/PokeAPI/Private/apiCalls/ConvertTo-PokeQueryString.ps1 @@ -0,0 +1,94 @@ +function ConvertTo-PokeQueryString { +<# + .SYNOPSIS + Converts uri filter parameters + + .DESCRIPTION + The Invoke-PokeRequest cmdlet converts & formats uri filter parameters + from a function which are later used to make the full resource uri for + an API call + + This is an internal helper function the ties in directly with the + Invoke-PokeRequest & any public functions that define parameters + + .PARAMETER uri_Filter + Hashtable of values to combine a functions parameters with + the resource_Uri parameter. + + This allows for the full uri query to occur + + .PARAMETER resource_Uri + Defines the short resource uri (url) to use when creating the API call + + .EXAMPLE + ConvertTo-PokeQueryString -uri_Filter $uri_Filter -resource_Uri '/account' + + Example: (From public function) + $uri_Filter = @{} + + ForEach ( $Key in $PSBoundParameters.GetEnumerator() ){ + if( $excludedParameters -contains $Key.Key ){$null} + else{ $uri_Filter += @{ $Key.Key = $Key.Value } } + } + + 1x key = https://pokeapi.co/api/v2/account?accountId=12345 + 2x key = https://pokeapi.co/api/v2/account?accountId=12345&details=True + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/ConvertTo-PokeQueryString.html + +#> + +[CmdletBinding()] +param( + [Parameter(Mandatory = $true, ValueFromPipeline = $true)] + [hashtable]$uri_Filter, + + [Parameter(Mandatory = $true)] + [String]$resource_Uri +) + + begin {} + + process { + + if (-not $uri_Filter) { + return "" + } + + $excludedParameters = 'Debug', 'ErrorAction', 'ErrorVariable', 'InformationAction', 'InformationVariable', + 'OutBuffer', 'OutVariable', 'PipelineVariable', 'Verbose', 'WarningAction', 'WarningVariable', + 'allPages', 'id', 'name' + + $query_Parameters = [System.Web.HttpUtility]::ParseQueryString([String]::Empty) + + ForEach ( $Key in $uri_Filter.GetEnumerator() ){ + + if( $excludedParameters -contains $Key.Key ){$null} + elseif ( $Key.Value.GetType().IsArray ){ + Write-Verbose "[ $($Key.Key) ] is an array parameter" + foreach ($Value in $Key.Value) { + #$ParameterName = $Key.Key + $query_Parameters.Add($Key.Key, $Value) + } + } + else{ + $query_Parameters.Add($Key.Key, $Key.Value) + } + + } + + # Build the request and load it with the query string. + $uri_Request = [System.UriBuilder]($Poke_Base_URI + $resource_Uri) + $uri_Request.Query = $query_Parameters.ToString() + + return $uri_Request + + } + + end {} + +} \ No newline at end of file diff --git a/PokeAPI/Private/apiCalls/Get-PokeMetaData.ps1 b/PokeAPI/Private/apiCalls/Get-PokeMetaData.ps1 new file mode 100644 index 0000000..7fc6560 --- /dev/null +++ b/PokeAPI/Private/apiCalls/Get-PokeMetaData.ps1 @@ -0,0 +1,91 @@ +function Get-PokeMetaData { +<# + .SYNOPSIS + Gets various Api metadata values + + .DESCRIPTION + The Get-PokeMetaData cmdlet gets various Api metadata values from an + Invoke-WebRequest to assist in various troubleshooting scenarios such + as rate-limiting. + + .PARAMETER base_uri + Define the base URI for the Poke API connection using Poke's URI or a custom URI. + + The default base URI is https://pokeapi.co/api/v2 + + .EXAMPLE + Get-PokeMetaData + + Gets various Api metadata values from an Invoke-WebRequest to assist + in various troubleshooting scenarios such as rate-limiting. + + The default full base uri test path is: + https://pokeapi.co/api/v2 + + .EXAMPLE + Get-PokeMetaData -base_uri http://myapi.gateway.example.com + + Gets various Api metadata values from an Invoke-WebRequest to assist + in various troubleshooting scenarios such as rate-limiting. + + The full base uri test path in this example is: + http://myapi.gateway.example.com/device + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeMetaData.html +#> + + [CmdletBinding()] + Param ( + [parameter(Mandatory = $false, ValueFromPipeline = $true)] + [string]$base_uri = $Poke_Base_URI + ) + + begin { $resource_uri = "/" } + + process { + + try { + + $Poke_Headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" + $Poke_Headers.Add("Content-Type", 'application/json') + + $rest_output = Invoke-WebRequest -method Get -uri ($base_uri + $resource_uri) -headers $Poke_Headers -ErrorAction Stop + } + catch { + + [PSCustomObject]@{ + Method = $_.Exception.Response.Method + StatusCode = $_.Exception.Response.StatusCode.value__ + StatusDescription = $_.Exception.Response.StatusDescription + Message = $_.Exception.Message + URI = $($Poke_Base_URI + $resource_uri) + } + + } + finally { + Remove-Variable -Name Poke_Headers -Force + } + + Set-Variable -Name Test_rest_output -Value $rest_output -Scope Global -Force + + if ($rest_output){ + $data = @{} + $data = $rest_output + + [PSCustomObject]@{ + ResponseUri = $data.BaseResponse.ResponseUri.AbsoluteUri + ResponsePort = $data.BaseResponse.ResponseUri.Port + StatusCode = $data.StatusCode + StatusDescription = $data.StatusDescription + raw = $data + } + } + + } + + end {} +} \ No newline at end of file diff --git a/PokeAPI/Private/apiCalls/Invoke-PokeRequest.ps1 b/PokeAPI/Private/apiCalls/Invoke-PokeRequest.ps1 new file mode 100644 index 0000000..284ed37 --- /dev/null +++ b/PokeAPI/Private/apiCalls/Invoke-PokeRequest.ps1 @@ -0,0 +1,177 @@ +function Invoke-PokeRequest { +<# + .SYNOPSIS + Makes an API request + + .DESCRIPTION + The Invoke-PokeRequest cmdlet invokes an API request to Poke API. + + This is an internal function that is used by all public functions + + As of 2023-08 the Poke v1 API only supports GET requests + + .PARAMETER method + Defines the type of API method to use + + Allowed values: + 'GET', 'PUT' + + .PARAMETER resource_Uri + Defines the resource uri (url) to use when creating the API call + + .PARAMETER uri_Filter + Used with the internal function [ ConvertTo-PokeQueryString ] to combine + a functions parameters with the resource_Uri parameter. + + This allows for the full uri query to occur + + The full resource path is made with the following data + $Poke_Base_URI + $resource_Uri + ConvertTo-PokeQueryString + + .PARAMETER data + Place holder parameter to use when other methods are supported + by the Poke v1 API + + .PARAMETER allPages + Returns all items from an endpoint + + When using this parameter there is no need to use either the page or perPage + parameters + + .EXAMPLE + Invoke-PokeRequest -method GET -resource_Uri '/account' -uri_Filter $uri_Filter + + Invoke a rest method against the defined resource using any of the provided parameters + + Example: + Name Value + ---- ----- + Method GET + Uri https://pokeapi.co/api/v2/account?accountId=12345&details=True + + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Invoke-PokeRequest.html + +#> + + [CmdletBinding()] + param ( + [Parameter(Mandatory = $false)] + [ValidateSet('GET')] + [String]$method = 'GET', + + [Parameter(Mandatory = $true)] + [String]$resource_Uri, + + [Parameter(Mandatory = $false)] + [Hashtable]$uri_Filter = $null, + + [Parameter(Mandatory = $false)] + [Switch]$allPages + + ) + + begin {} + + process { + + # Load Web assembly when needed as PowerShell Core has the assembly preloaded + if ( !("System.Web.HttpUtility" -as [Type]) ) { + Add-Type -Assembly System.Web + } + + $query_string = ConvertTo-PokeQueryString -uri_Filter $uri_Filter -resource_Uri $resource_Uri + + Set-Variable -Name 'PokeAPI_queryString' -Value $query_string -Scope Global -Force + + try { + + $parameters = [ordered] @{ + "Method" = $method + "Uri" = $query_string.Uri + } + + Set-Variable -Name 'PokeAPI_invokeParameters' -Value $parameters -Scope Global -Force + + if ($allPages) { + + Write-Verbose "Gathering all items from [ $( $Poke_Base_URI + $resource_Uri ) ] " + + $page_number = 1 + $all_responseData = [System.Collections.Generic.List[object]]::new() + + do { + + $current_page = Invoke-RestMethod @parameters -ErrorAction Stop + + $total_Count = $current_page.count + $offset = if([bool]$current_page.next){([regex]::match($current_page.next,'(offset=[0-9]+)').Groups[1].Value) -Replace '\D+'}else{$null} + $limit = if([bool]$current_page.next){([regex]::match($current_page.next,'(limit=[0-9]+)').Groups[1].Value) -Replace '\D+'}else{$null} + $total_pages = if([bool]$current_page.next ){[math]::ceiling($($total_Count - $offset)/$limit + $page_number)}else{$null} + + Write-Verbose "[ $page_number ] of [ $total_pages ] pages" + + foreach ($item in $current_page.results) { + $all_responseData.add($item) + } + + $parameters.Remove('Uri') > $null + $parameters.Add('Uri',$current_page.next) + + $page_number++ + + } while ($null -ne $current_page.next) + + } + else{ + $api_response = Invoke-RestMethod @parameters -ErrorAction Stop + } + + } + catch { + + $exceptionError = $_.Exception.Message + Write-Warning 'The [ Poke_invokeParameters, Poke_queryString, & Poke_CmdletNameParameters ] variables can provide extra details' + + switch -Wildcard ($exceptionError) { + '*404*' { Write-Error "Invoke-PokeRequest : [ $resource_Uri ] not found!" } + '*429*' { Write-Error 'Invoke-PokeRequest : API rate limited' } + '*504*' { Write-Error "Invoke-PokeRequest : Gateway Timeout" } + default { Write-Error $_ } + } + + } + finally {} + + + if($allPages) { + + Set-Variable -Name Test_all_responseData -Value $all_responseData -Scope Global -Force + + #Making output consistent + if( [string]::IsNullOrEmpty($all_responseData) ) { + $api_response = $null + } + else{ + $api_response = [PSCustomObject]@{ + count = $total_Count + next = $null + previous = $null + results = $all_responseData + } + } + + return $api_response + + } + else{ return $api_response } + + } + + end {} + +} \ No newline at end of file diff --git a/PokeAPI/Private/baseUri/Add-PokeBaseURI.ps1 b/PokeAPI/Private/baseUri/Add-PokeBaseURI.ps1 new file mode 100644 index 0000000..490b3b0 --- /dev/null +++ b/PokeAPI/Private/baseUri/Add-PokeBaseURI.ps1 @@ -0,0 +1,53 @@ +function Add-PokeBaseURI { +<# + .SYNOPSIS + Sets the base URI for the Poke API connection. + + .DESCRIPTION + The Add-PokeBaseURI cmdlet sets the base URI which is later used + to construct the full URI for all API calls. + + .PARAMETER base_uri + Define the base URI for the Poke API connection using Poke's URI or a custom URI. + + .EXAMPLE + Add-PokeBaseURI + + The base URI will use https://pokeapi.co/api/v2/ which is Poke's default URI. + + .EXAMPLE + Add-PokeBaseURI -base_uri http://myapi.gateway.example.com + + A custom API gateway of http://myapi.gateway.example.com will be used for all API calls to Poke's API. + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Add-PokeBaseURI.html +#> + + [cmdletbinding()] + Param ( + [Parameter(Mandatory = $false , ValueFromPipeline = $true)] + [string]$base_uri = 'https://pokeapi.co/api/v2' + ) + + begin {} + + process { + + # Trim superfluous forward slash from address (if applicable) + if ($base_uri[$base_uri.Length-1] -eq "/") { + $base_uri = $base_uri.Substring(0,$base_uri.Length-1) + } + + Set-Variable -Name "Poke_Base_URI" -Value $base_uri -Option ReadOnly -Scope global -Force + + } + + end {} + +} + +New-Alias -Name Set-PokeBaseURI -Value Add-PokeBaseURI \ No newline at end of file diff --git a/PokeAPI/Private/baseUri/Get-PokeBaseURI.ps1 b/PokeAPI/Private/baseUri/Get-PokeBaseURI.ps1 new file mode 100644 index 0000000..f55acab --- /dev/null +++ b/PokeAPI/Private/baseUri/Get-PokeBaseURI.ps1 @@ -0,0 +1,37 @@ +function Get-PokeBaseURI { +<# + .SYNOPSIS + Shows the Poke base URI global variable. + + .DESCRIPTION + The Get-PokeBaseURI cmdlet shows the Poke base URI global variable value. + + .EXAMPLE + Get-PokeBaseURI + + Shows the Poke base URI global variable value. + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeBaseURI.html +#> + + [cmdletbinding()] + Param () + + begin {} + + process { + + switch ([bool]$Poke_Base_URI) { + $true { $Poke_Base_URI } + $false { Write-Warning "The Poke base URI is not set. Run Add-PokeBaseURI to set the base URI." } + } + + } + + end {} + +} \ No newline at end of file diff --git a/PokeAPI/Private/baseUri/Remove-PokeBaseURI.ps1 b/PokeAPI/Private/baseUri/Remove-PokeBaseURI.ps1 new file mode 100644 index 0000000..3263013 --- /dev/null +++ b/PokeAPI/Private/baseUri/Remove-PokeBaseURI.ps1 @@ -0,0 +1,37 @@ +function Remove-PokeBaseURI { +<# + .SYNOPSIS + Removes the Poke base URI global variable. + + .DESCRIPTION + The Remove-PokeBaseURI cmdlet removes the Poke base URI global variable. + + .EXAMPLE + Remove-PokeBaseURI + + Removes the Poke base URI global variable. + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Remove-PokeBaseURI.html +#> + + [cmdletbinding(SupportsShouldProcess)] + Param () + + begin {} + + process { + + switch ([bool]$Poke_Base_URI) { + $true { Remove-Variable -Name "Poke_Base_URI" -Scope global -Force } + $false { Write-Warning "The Poke base URI variable is not set. Nothing to remove" } + } + + } + + end {} + +} \ No newline at end of file diff --git a/PokeAPI/Private/moduleSettings/Export-PokeModuleSettings.ps1 b/PokeAPI/Private/moduleSettings/Export-PokeModuleSettings.ps1 new file mode 100644 index 0000000..ac91c69 --- /dev/null +++ b/PokeAPI/Private/moduleSettings/Export-PokeModuleSettings.ps1 @@ -0,0 +1,82 @@ +function Export-PokeModuleSettings { +<# + .SYNOPSIS + Exports the Poke BaseURI, API, & JSON configuration information to file. + + .DESCRIPTION + The Export-PokeModuleSettings cmdlet exports the Poke BaseURI information to file. + + .PARAMETER PokeConfPath + Define the location to store the Poke configuration file. + + By default the configuration file is stored in the following location: + $env:USERPROFILE\PokeAPI + + .PARAMETER PokeConfFile + Define the name of the Poke configuration file. + + By default the configuration file is named: + config.psd1 + + .EXAMPLE + Export-PokeModuleSettings + + Validates that the BaseURI is set then exports their values + to the current user's Poke configuration file located at: + $env:USERPROFILE\PokeAPI\config.psd1 + + .EXAMPLE + Export-PokeModuleSettings -PokeConfPath C:\PokeAPI -PokeConfFile MyConfig.psd1 + + Validates that the BaseURI is set then exports their values + to the current user's Poke configuration file located at: + C:\PokeAPI\MyConfig.psd1 + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Export-PokeModuleSettings.html +#> + + [CmdletBinding(DefaultParameterSetName = 'set')] + Param ( + [Parameter(ParameterSetName = 'set')] + [string]$PokeConfPath = $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ), + + [Parameter(ParameterSetName = 'set')] + [string]$PokeConfFile = 'config.psd1' + ) + + begin {} + + process { + + $PokeConfig = Join-Path -Path $PokeConfPath -ChildPath $PokeConfFile + + # Confirm variables exist and are not null before exporting + if ($Poke_Base_URI) { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + New-Item -Path $PokeConfPath -ItemType Directory -Force | ForEach-Object { $_.Attributes = $_.Attributes -bor "Hidden" } + } + else{ + New-Item -Path $PokeConfPath -ItemType Directory -Force + } +@" + @{ + Poke_Base_URI = '$Poke_Base_URI' + } +"@ | Out-File -FilePath $PokeConfig -Force + } + else { + Write-Error "Failed to export Poke Module settings to [ $PokeConfig ]" + Write-Error $_ + exit 1 + } + + } + + end {} + +} \ No newline at end of file diff --git a/PokeAPI/Private/moduleSettings/Get-PokeModuleSettings.ps1 b/PokeAPI/Private/moduleSettings/Get-PokeModuleSettings.ps1 new file mode 100644 index 0000000..5719dca --- /dev/null +++ b/PokeAPI/Private/moduleSettings/Get-PokeModuleSettings.ps1 @@ -0,0 +1,88 @@ +function Get-PokeModuleSettings { +<# + .SYNOPSIS + Gets the saved Poke configuration settings + + .DESCRIPTION + The Get-PokeModuleSettings cmdlet gets the saved Poke configuration settings + from the local system. + + By default the configuration file is stored in the following location: + $env:USERPROFILE\PokeAPI + + .PARAMETER PokeConfPath + Define the location to store the Poke configuration file. + + By default the configuration file is stored in the following location: + $env:USERPROFILE\PokeAPI + + .PARAMETER PokeConfFile + Define the name of the Poke configuration file. + + By default the configuration file is named: + config.psd1 + + .PARAMETER openConfFile + Opens the Poke configuration file + + .EXAMPLE + Get-PokeModuleSettings + + Gets the contents of the configuration file that was created with the + Export-PokeModuleSettings + + The default location of the Poke configuration file is: + $env:USERPROFILE\PokeAPI\config.psd1 + + .EXAMPLE + Get-PokeModuleSettings -PokeConfPath C:\PokeAPI -PokeConfFile MyConfig.psd1 -openConfFile + + Opens the configuration file from the defined location in the default editor + + The location of the Poke configuration file in this example is: + C:\PokeAPI\MyConfig.psd1 + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeModuleSettings.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index')] + Param ( + [Parameter(Mandatory = $false, ParameterSetName = 'index')] + [string]$PokeConfPath = $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ), + + [Parameter(Mandatory = $false, ParameterSetName = 'index')] + [String]$PokeConfFile = 'config.psd1', + + [Parameter(Mandatory = $false, ParameterSetName = 'show')] + [Switch]$openConfFile + ) + + begin { + $PokeConfig = Join-Path -Path $PokeConfPath -ChildPath $PokeConfFile + } + + process { + + if ( Test-Path -Path $PokeConfig ){ + + if($openConfFile){ + Invoke-Item -Path $PokeConfig + } + else{ + Import-LocalizedData -BaseDirectory $PokeConfPath -FileName $PokeConfFile + } + + } + else{ + Write-Verbose "No configuration file found at [ $PokeConfig ]" + } + + } + + end {} + +} \ No newline at end of file diff --git a/PokeAPI/Private/moduleSettings/Import-PokeModuleSettings.ps1 b/PokeAPI/Private/moduleSettings/Import-PokeModuleSettings.ps1 new file mode 100644 index 0000000..5a169d8 --- /dev/null +++ b/PokeAPI/Private/moduleSettings/Import-PokeModuleSettings.ps1 @@ -0,0 +1,88 @@ +function Import-PokeModuleSettings { +<# + .SYNOPSIS + Imports the Poke BaseURI information to the current session. + + .DESCRIPTION + The Import-PokeModuleSettings cmdlet imports the Poke BaseURI stored in the + Poke configuration file to the users current session. + + By default the configuration file is stored in the following location: + $env:USERPROFILE\PokeAPI + + .PARAMETER PokeConfPath + Define the location to store the Poke configuration file. + + By default the configuration file is stored in the following location: + $env:USERPROFILE\PokeAPI + + .PARAMETER PokeConfFile + Define the name of the Poke configuration file. + + By default the configuration file is named: + config.psd1 + + .EXAMPLE + Import-PokeModuleSettings + + Validates that the configuration file created with the Export-PokeModuleSettings cmdlet exists + then imports the stored data into the current users session. + + The default location of the Poke configuration file is: + $env:USERPROFILE\PokeAPI\config.psd1 + + .EXAMPLE + Import-PokeModuleSettings -PokeConfPath C:\PokeAPI -PokeConfFile MyConfig.psd1 + + Validates that the configuration file created with the Export-PokeModuleSettings cmdlet exists + then imports the stored data into the current users session. + + The location of the Poke configuration file in this example is: + C:\PokeAPI\MyConfig.psd1 + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Import-PokeModuleSettings.html +#> + + [CmdletBinding(DefaultParameterSetName = 'set')] + Param ( + [Parameter(ParameterSetName = 'set')] + [string]$PokeConfPath = $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ), + + [Parameter(ParameterSetName = 'set')] + [string]$PokeConfFile = 'config.psd1' + ) + + begin { + $PokeConfig = Join-Path -Path $PokeConfPath -ChildPath $PokeConfFile + } + + process { + + if ( Test-Path $PokeConfig ) { + $tmp_config = Import-LocalizedData -BaseDirectory $PokeConfPath -FileName $PokeConfFile + + # Send to function to strip potentially superfluous slash (/) + Add-PokeBaseURI $tmp_config.Poke_Base_URI + + Write-Verbose "PokeAPI Module configuration loaded successfully from [ $PokeConfig ]" + + # Clean things up + Remove-Variable "tmp_config" + } + else { + Write-Verbose "No configuration file found at [ $PokeConfig ] run Add-PokeAPIKey to get started." + + Add-PokeBaseURI + + Set-Variable -Name "Poke_Base_URI" -Value $(Get-PokeBaseURI) -Option ReadOnly -Scope global -Force + } + + } + + end {} + +} \ No newline at end of file diff --git a/PokeAPI/Private/moduleSettings/Initialize-PokeModuleSettings.ps1 b/PokeAPI/Private/moduleSettings/Initialize-PokeModuleSettings.ps1 new file mode 100644 index 0000000..d32c818 --- /dev/null +++ b/PokeAPI/Private/moduleSettings/Initialize-PokeModuleSettings.ps1 @@ -0,0 +1,2 @@ +#Used to auto load either baseline settings or saved configurations when the module is imported +Import-PokeModuleSettings -Verbose:$false \ No newline at end of file diff --git a/PokeAPI/Private/moduleSettings/Remove-PokeModuleSettings.ps1 b/PokeAPI/Private/moduleSettings/Remove-PokeModuleSettings.ps1 new file mode 100644 index 0000000..0563afc --- /dev/null +++ b/PokeAPI/Private/moduleSettings/Remove-PokeModuleSettings.ps1 @@ -0,0 +1,85 @@ +function Remove-PokeModuleSettings { +<# + .SYNOPSIS + Removes the stored Poke configuration folder. + + .DESCRIPTION + The Remove-PokeModuleSettings cmdlet removes the Poke folder and its files. + This cmdlet also has the option to remove sensitive Poke variables as well. + + By default configuration files are stored in the following location and will be removed: + $env:USERPROFILE\PokeAPI + + .PARAMETER PokeConfPath + Define the location of the Poke configuration folder. + + By default the configuration folder is located at: + $env:USERPROFILE\PokeAPI + + .PARAMETER andVariables + Define if sensitive Poke variables should be removed as well. + + By default the variables are not removed. + + .EXAMPLE + Remove-PokeModuleSettings + + Checks to see if the default configuration folder exists and removes it if it does. + + The default location of the Poke configuration folder is: + $env:USERPROFILE\PokeAPI + + .EXAMPLE + Remove-PokeModuleSettings -PokeConfPath C:\PokeAPI -andVariables + + Checks to see if the defined configuration folder exists and removes it if it does. + If sensitive Poke variables exist then they are removed as well. + + The location of the Poke configuration folder in this example is: + C:\PokeAPI + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Remove-PokeModuleSettings.html +#> + + [CmdletBinding(SupportsShouldProcess, DefaultParameterSetName = 'set')] + Param ( + [Parameter(ParameterSetName = 'set')] + [string]$PokeConfPath = $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ), + + [Parameter(ParameterSetName = 'set')] + [switch]$andVariables + ) + + begin {} + + process { + + if (Test-Path $PokeConfPath) { + + Remove-Item -Path $PokeConfPath -Recurse -Force -WhatIf:$WhatIfPreference + + If ($andVariables) { + Remove-PokeBaseURI + } + + if (!(Test-Path $PokeConfPath)) { + Write-Output "The PokeAPI configuration folder has been removed successfully from [ $PokeConfPath ]" + } + else { + Write-Error "The PokeAPI configuration folder could not be removed from [ $PokeConfPath ]" + } + + } + else { + Write-Warning "No configuration folder found at [ $PokeConfPath ]" + } + + } + + end {} + +} \ No newline at end of file diff --git a/PokeAPI/Public/berry/Get-PokeBerry.ps1 b/PokeAPI/Public/berry/Get-PokeBerry.ps1 new file mode 100644 index 0000000..31e8990 --- /dev/null +++ b/PokeAPI/Public/berry/Get-PokeBerry.ps1 @@ -0,0 +1,106 @@ +function Get-PokeBerry { +<# + .SYNOPSIS + Gets berries from PokeAPI + + .DESCRIPTION + The Get-PokeBerry cmdlet gets berries from PokeAPI + + Berries are small fruits that can provide HP and status condition restoration, + stat enhancement, and even damage negation when eaten by Pokemon + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeBerry + + Gets the first 20 berries sorted by id + + .EXAMPLE + Get-PokeBerry -id 1 + + Gets the berry with the defined id + + .EXAMPLE + Get-PokeBerry -name ditto + + Gets the berry with the defined name + + .EXAMPLE + Get-PokeBerry -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerry.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/berry" } + 'index_ById' { $resource_uri = "/berry/$id" } + 'index_ByName' { $resource_uri = ("/berry/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_BerryParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/berry/Get-PokeBerryFirmness.ps1 b/PokeAPI/Public/berry/Get-PokeBerryFirmness.ps1 new file mode 100644 index 0000000..6dac4ef --- /dev/null +++ b/PokeAPI/Public/berry/Get-PokeBerryFirmness.ps1 @@ -0,0 +1,106 @@ +function Get-PokeBerryFirmness { +<# + .SYNOPSIS + Gets the firmness of berries from PokeAPI + + .DESCRIPTION + The Get-PokeBerryFirmness cmdlet gets the firmness of + berries from PokeAPI + + Berries can be soft or hard + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeBerryFirmness + + Gets the first 20 berry firmness sorted by id + + .EXAMPLE + Get-PokeBerryFirmness -id 1 + + Gets the berry firmness with the defined id + + .EXAMPLE + Get-PokeBerryFirmness -name ditto + + Gets the berry firmness with the defined name + + .EXAMPLE + Get-PokeBerryFirmness -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerryFirmness.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/berry-firmness" } + 'index_ById' { $resource_uri = "/berry-firmness/$id" } + 'index_ByName' { $resource_uri = ("/berry-firmness/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_BerryFirmnessParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/berry/Get-PokeBerryFlavor.ps1 b/PokeAPI/Public/berry/Get-PokeBerryFlavor.ps1 new file mode 100644 index 0000000..c0ce631 --- /dev/null +++ b/PokeAPI/Public/berry/Get-PokeBerryFlavor.ps1 @@ -0,0 +1,106 @@ +function Get-PokeBerryFlavor { +<# + .SYNOPSIS + Gets berry flavor from PokeAPI + + .DESCRIPTION + The Get-PokeBerryFlavor cmdlet gets berry flavor from PokeAPI + + Flavors determine whether a Pokemon will benefit or suffer + from eating a berry based on their nature + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeBerryFlavor + + Gets the first 20 berry flavors sorted by id + + .EXAMPLE + Get-PokeBerryFlavor -id 1 + + Gets the berry flavor with the defined id + + .EXAMPLE + Get-PokeBerryFlavor -name ditto + + Gets the berry flavor with the defined name + + .EXAMPLE + Get-PokeBerryFlavor -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerryFlavor.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/berry-flavor" } + 'index_ById' { $resource_uri = "/berry-flavor/$id" } + 'index_ByName' { $resource_uri = ("/berry-flavor/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_BerryFlavorParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/contest/Get-PokeContestEffect.ps1 b/PokeAPI/Public/contest/Get-PokeContestEffect.ps1 new file mode 100644 index 0000000..1a1af1a --- /dev/null +++ b/PokeAPI/Public/contest/Get-PokeContestEffect.ps1 @@ -0,0 +1,105 @@ +function Get-PokeContestEffect { +<# + .SYNOPSIS + Gets contest effects from PokeAPI + + .DESCRIPTION + The Get-PokeContestEffect cmdlet gets contest effects from PokeAPI + + Contest effects refer to the effects of moves when used in contests + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeContestEffect + + Gets the first 20 contest effects sorted by id + + .EXAMPLE + Get-PokeContestEffect -id 1 + + Gets the contest effect with the defined id + + .EXAMPLE + Get-PokeContestEffect -name ditto + + Gets the contest effect with the defined name + + .EXAMPLE + Get-PokeContestEffect -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestEffect.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/contest-effect" } + 'index_ById' { $resource_uri = "/contest-effect/$id" } + 'index_ByName' { $resource_uri = ("/contest-effect/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_ContestEffectParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/contest/Get-PokeContestSuperEffect.ps1 b/PokeAPI/Public/contest/Get-PokeContestSuperEffect.ps1 new file mode 100644 index 0000000..56ec72c --- /dev/null +++ b/PokeAPI/Public/contest/Get-PokeContestSuperEffect.ps1 @@ -0,0 +1,107 @@ +function Get-PokeContestSuperEffect { +<# + .SYNOPSIS + Gets super contest effects from PokeAPI + + .DESCRIPTION + The Get-PokeContestSuperEffect cmdlet gets super contest effects + from PokeAPI + + Super contest effects refer to the effects of moves when + used in super contests + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeContestSuperEffect + + Gets the first 20 super contest effects sorted by id + + .EXAMPLE + Get-PokeContestSuperEffect -id 1 + + Gets the super contest effect with the defined id + + .EXAMPLE + Get-PokeContestSuperEffect -name ditto + + Gets the super contest effect with the defined name + + .EXAMPLE + Get-PokeContestSuperEffect -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestSuperEffect.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/super-contest-effect" } + 'index_ById' { $resource_uri = "/super-contest-effect/$id" } + 'index_ByName' { $resource_uri = ("/super-contest-effect/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_ContestSuperEffectParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/contest/Get-PokeContestType.ps1 b/PokeAPI/Public/contest/Get-PokeContestType.ps1 new file mode 100644 index 0000000..d3ce37d --- /dev/null +++ b/PokeAPI/Public/contest/Get-PokeContestType.ps1 @@ -0,0 +1,106 @@ +function Get-PokeContestType { +<# + .SYNOPSIS + Gets contest types from PokeAPI + + .DESCRIPTION + The Get-PokeContestType cmdlet gets contest types from PokeAPI + + Contest types are categories judges used to weigh a + Pokemon's condition in Pokemon contests. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeContestType + + Gets the first 20 contest types sorted by id + + .EXAMPLE + Get-PokeContestType -id 1 + + Gets the contest type with the defined id + + .EXAMPLE + Get-PokeContestType -name ditto + + Gets the contest type with the defined name + + .EXAMPLE + Get-PokeContestType -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestType.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/contest-type" } + 'index_ById' { $resource_uri = "/contest-type/$id" } + 'index_ByName' { $resource_uri = ("/contest-type/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_ContestTypeParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/encounter/Get-PokeEncounterCondition.ps1 b/PokeAPI/Public/encounter/Get-PokeEncounterCondition.ps1 new file mode 100644 index 0000000..1f17ca7 --- /dev/null +++ b/PokeAPI/Public/encounter/Get-PokeEncounterCondition.ps1 @@ -0,0 +1,106 @@ +function Get-PokeEncounterCondition { +<# + .SYNOPSIS + Gets encounter conditions from PokeAPI + + .DESCRIPTION + The Get-PokeEncounterCondition cmdlet gets encounter conditions from PokeAPI + + Conditions which affect what pokemon might appear in the + wild, e.g., day or night. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeEncounterCondition + + Gets the first 20 encounter conditions sorted by id + + .EXAMPLE + Get-PokeEncounterCondition -id 1 + + Gets the encounter condition with the defined id + + .EXAMPLE + Get-PokeEncounterCondition -name ditto + + Gets the encounter condition with the defined name + + .EXAMPLE + Get-PokeEncounterCondition -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterCondition.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/encounter-condition" } + 'index_ById' { $resource_uri = "/encounter-condition/$id" } + 'index_ByName' { $resource_uri = ("/encounter-condition/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_EncounterConditionParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/encounter/Get-PokeEncounterConditionValue.ps1 b/PokeAPI/Public/encounter/Get-PokeEncounterConditionValue.ps1 new file mode 100644 index 0000000..2aee74e --- /dev/null +++ b/PokeAPI/Public/encounter/Get-PokeEncounterConditionValue.ps1 @@ -0,0 +1,107 @@ +function Get-PokeEncounterConditionValue { +<# + .SYNOPSIS + Gets encounter condition values from PokeAPI + + .DESCRIPTION + The Get-PokeEncounterConditionValue cmdlet gets encounter condition values + from PokeAPI + + Encounter condition values are the various states that an encounter + condition can have, i.e., time of day can be either day or night. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeEncounterConditionValue + + Gets the first 20 encounter condition values sorted by id + + .EXAMPLE + Get-PokeEncounterConditionValue -id 1 + + Gets the encounter condition value with the defined id + + .EXAMPLE + Get-PokeEncounterConditionValue -name ditto + + Gets the encounter condition value with the defined name + + .EXAMPLE + Get-PokeEncounterConditionValue -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterConditionValue.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/encounter-condition-value" } + 'index_ById' { $resource_uri = "/encounter-condition-value/$id" } + 'index_ByName' { $resource_uri = ("/encounter-condition-value/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_EncounterConditionValueParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/encounter/Get-PokeEncounterMethod.ps1 b/PokeAPI/Public/encounter/Get-PokeEncounterMethod.ps1 new file mode 100644 index 0000000..adea059 --- /dev/null +++ b/PokeAPI/Public/encounter/Get-PokeEncounterMethod.ps1 @@ -0,0 +1,106 @@ +function Get-PokeEncounterMethod { +<# + .SYNOPSIS + Gets encounter methods from PokeAPI + + .DESCRIPTION + The Get-PokeEncounterMethod cmdlet gets encounter methods from PokeAPI + + Methods by which the player might can encounter Pokemon in the wild, + e.g., walking in tall grass + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeEncounterMethod + + Gets the first 20 encounter methods sorted by id + + .EXAMPLE + Get-PokeEncounterMethod -id 1 + + Gets the encounter method with the defined id + + .EXAMPLE + Get-PokeEncounterMethod -name ditto + + Gets the encounter method with the defined name + + .EXAMPLE + Get-PokeEncounterMethod -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterMethod.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/encounter-method" } + 'index_ById' { $resource_uri = "/encounter-method/$id" } + 'index_ByName' { $resource_uri = ("/encounter-method/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_EncounterMethodParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/evolution/Get-PokeEvolutionChain.ps1 b/PokeAPI/Public/evolution/Get-PokeEvolutionChain.ps1 new file mode 100644 index 0000000..b6a72b4 --- /dev/null +++ b/PokeAPI/Public/evolution/Get-PokeEvolutionChain.ps1 @@ -0,0 +1,107 @@ +function Get-PokeEvolutionChain { +<# + .SYNOPSIS + Gets evolution chains from PokeAPI + + .DESCRIPTION + The Get-PokeEvolutionChain cmdlet gets evolution chains from PokeAPI + + Evolution chains are essentially family trees. They start with the lowest stage + within a family and detail evolution conditions for each as well as Pokemon + they can evolve into up through the hierarchy. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeEvolutionChain + + Gets the first 20 evolution chains sorted by id + + .EXAMPLE + Get-PokeEvolutionChain -id 1 + + Gets the evolution chain with the defined id + + .EXAMPLE + Get-PokeEvolutionChain -name ditto + + Gets the evolution chain with the defined name + + .EXAMPLE + Get-PokeEvolutionChain -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/evolution/Get-PokeEvolutionChain.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/evolution-chain" } + 'index_ById' { $resource_uri = "/evolution-chain/$id" } + 'index_ByName' { $resource_uri = ("/evolution-chain/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_EvolutionChainParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/evolution/Get-PokeEvolutionTrigger.ps1 b/PokeAPI/Public/evolution/Get-PokeEvolutionTrigger.ps1 new file mode 100644 index 0000000..0da5063 --- /dev/null +++ b/PokeAPI/Public/evolution/Get-PokeEvolutionTrigger.ps1 @@ -0,0 +1,105 @@ +function Get-PokeEvolutionTrigger { +<# + .SYNOPSIS + Gets evolution triggers from PokeAPI + + .DESCRIPTION + The Get-PokeEvolutionTrigger cmdlet gets evolution triggers from PokeAPI + + Evolution triggers are the events and conditions that cause a Pokemon to evolve + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeEvolutionTrigger + + Gets the first 20 evolution triggers sorted by id + + .EXAMPLE + Get-PokeEvolutionTrigger -id 1 + + Gets the evolution trigger with the defined id + + .EXAMPLE + Get-PokeEvolutionTrigger -name ditto + + Gets the evolution trigger with the defined name + + .EXAMPLE + Get-PokeEvolutionTrigger -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/evolution/Get-PokeEvolutionTrigger.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/evolution-trigger" } + 'index_ById' { $resource_uri = "/evolution-trigger/$id" } + 'index_ByName' { $resource_uri = ("/evolution-trigger/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_EvolutionTriggerParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/game/Get-PokeGameGeneration.ps1 b/PokeAPI/Public/game/Get-PokeGameGeneration.ps1 new file mode 100644 index 0000000..d72e11a --- /dev/null +++ b/PokeAPI/Public/game/Get-PokeGameGeneration.ps1 @@ -0,0 +1,109 @@ +function Get-PokeGameGeneration { +<# + .SYNOPSIS + Gets game generations from PokeAPI + + .DESCRIPTION + The Get-PokeGameGeneration cmdlet gets game generations from PokeAPI + + A generation is a grouping of the Pokemon games that separates them based + on the Pokemon they include. + + In each generation, a new set of Pokemon, Moves, Abilities and Types that + did not exist in the previous generation are released. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeGameGeneration + + Gets the first 20 game generations sorted by id + + .EXAMPLE + Get-PokeGameGeneration -id 1 + + Gets the game generation with the defined id + + .EXAMPLE + Get-PokeGameGeneration -name ditto + + Gets the game generation with the defined name + + .EXAMPLE + Get-PokeGameGeneration -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameGeneration.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/generation" } + 'index_ById' { $resource_uri = "/generation/$id" } + 'index_ByName' { $resource_uri = ("/generation/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_GameGenerationParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/game/Get-PokeGamePokedex.ps1 b/PokeAPI/Public/game/Get-PokeGamePokedex.ps1 new file mode 100644 index 0000000..0269d39 --- /dev/null +++ b/PokeAPI/Public/game/Get-PokeGamePokedex.ps1 @@ -0,0 +1,107 @@ +function Get-PokeGamePokedex { +<# + .SYNOPSIS + Gets game pokedexes from PokeAPI + + .DESCRIPTION + The Get-PokeGamePokedex cmdlet gets game pokedexes from PokeAPI + + A Pokedex is a handheld electronic encyclopedia device; one which is capable of + recording and retaining information of the various Pokemon in a given region with the + exception of the national dex and some smaller dexes related to portions of a region + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeGamePokedex + + Gets the first 20 game pokedexes sorted by id + + .EXAMPLE + Get-PokeGamePokedex -id 1 + + Gets the game pokedex with the defined id + + .EXAMPLE + Get-PokeGamePokedex -name ditto + + Gets the game pokedex with the defined name + + .EXAMPLE + Get-PokeGamePokedex -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGamePokedex.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pokedex" } + 'index_ById' { $resource_uri = "/pokedex/$id" } + 'index_ByName' { $resource_uri = ("/pokedex/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_GamePokedexParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/game/Get-PokeGameVersion.ps1 b/PokeAPI/Public/game/Get-PokeGameVersion.ps1 new file mode 100644 index 0000000..235c718 --- /dev/null +++ b/PokeAPI/Public/game/Get-PokeGameVersion.ps1 @@ -0,0 +1,105 @@ +function Get-PokeGameVersion { +<# + .SYNOPSIS + Gets game versions from PokeAPI + + .DESCRIPTION + The Get-PokeGameVersion cmdlet gets game versions from PokeAPI + + Versions of the games, e.g., Red, Blue or Yellow + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeGameVersion + + Gets the first 20 game versions sorted by id + + .EXAMPLE + Get-PokeGameVersion -id 1 + + Gets the game version with the defined id + + .EXAMPLE + Get-PokeGameVersion -name ditto + + Gets the game version with the defined name + + .EXAMPLE + Get-PokeGameVersion -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameVersion.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/version" } + 'index_ById' { $resource_uri = "/version/$id" } + 'index_ByName' { $resource_uri = ("/version/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_GameVersionParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/game/Get-PokeGameVersionGroup.ps1 b/PokeAPI/Public/game/Get-PokeGameVersionGroup.ps1 new file mode 100644 index 0000000..c9dbf18 --- /dev/null +++ b/PokeAPI/Public/game/Get-PokeGameVersionGroup.ps1 @@ -0,0 +1,106 @@ +function Get-PokeGameVersionGroup { +<# + .SYNOPSIS + Gets game version groups from PokeAPI + + .DESCRIPTION + The Get-PokeGameVersionGroup cmdlet gets game version groups + from PokeAPI + + Version groups categorize highly similar versions of the games + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeGameVersionGroup + + Gets the first 20 game version groups sorted by id + + .EXAMPLE + Get-PokeGameVersionGroup -id 1 + + Gets the game version group with the defined id + + .EXAMPLE + Get-PokeGameVersionGroup -name ditto + + Gets the game version group with the defined name + + .EXAMPLE + Get-PokeGameVersionGroup -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameVersionGroup.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/version-group" } + 'index_ById' { $resource_uri = "/version-group/$id" } + 'index_ByName' { $resource_uri = ("/version-group/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_GameVersionGroupParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/item/Get-PokeItem.ps1 b/PokeAPI/Public/item/Get-PokeItem.ps1 new file mode 100644 index 0000000..147366d --- /dev/null +++ b/PokeAPI/Public/item/Get-PokeItem.ps1 @@ -0,0 +1,109 @@ +function Get-PokeItem { +<# + .SYNOPSIS + Gets items from PokeAPI + + .DESCRIPTION + The Get-PokeItem cmdlet gets items from PokeAPI + + An item is an object in the games which the player can pick up, + keep in their bag, and use in some manner + + They have various uses, including healing, powering up, helping catch + Pokemon, or to access a new area + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeItem + + Gets the first 20 items sorted by id + + .EXAMPLE + Get-PokeItem -id 1 + + Gets the item with the defined id + + .EXAMPLE + Get-PokeItem -name ditto + + Gets the item with the defined name + + .EXAMPLE + Get-PokeItem -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItem.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/item" } + 'index_ById' { $resource_uri = "/item/$id" } + 'index_ByName' { $resource_uri = ("/item/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_ItemParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/item/Get-PokeItemAttribute.ps1 b/PokeAPI/Public/item/Get-PokeItemAttribute.ps1 new file mode 100644 index 0000000..1fbadba --- /dev/null +++ b/PokeAPI/Public/item/Get-PokeItemAttribute.ps1 @@ -0,0 +1,106 @@ +function Get-PokeItemAttribute { +<# + .SYNOPSIS + Gets item attributes from PokeAPI + + .DESCRIPTION + The Get-PokeItemAttribute cmdlet gets item attributes from PokeAPI + + Item attributes define particular aspects of items, + e.g. "usable in battle" or "consumable" + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeItemAttribute + + Gets the first 20 item attributes sorted by id + + .EXAMPLE + Get-PokeItemAttribute -id 1 + + Gets the item attribute with the defined id + + .EXAMPLE + Get-PokeItemAttribute -name ditto + + Gets the item attribute with the defined name + + .EXAMPLE + Get-PokeItemAttribute -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemAttribute.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/item-attribute" } + 'index_ById' { $resource_uri = "/item-attribute/$id" } + 'index_ByName' { $resource_uri = ("/item-attribute/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_ItemAttributeParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/item/Get-PokeItemCategory.ps1 b/PokeAPI/Public/item/Get-PokeItemCategory.ps1 new file mode 100644 index 0000000..1adc353 --- /dev/null +++ b/PokeAPI/Public/item/Get-PokeItemCategory.ps1 @@ -0,0 +1,105 @@ +function Get-PokeItemCategory { +<# + .SYNOPSIS + Gets item categories from PokeAPI + + .DESCRIPTION + The Get-PokeItemCategory cmdlet gets item categories from PokeAPI + + Item categories determine where items will be placed in the players bag + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeItemCategory + + Gets the first 20 item categories sorted by id + + .EXAMPLE + Get-PokeItemCategory -id 1 + + Gets the item category with the defined id + + .EXAMPLE + Get-PokeItemCategory -name ditto + + Gets the item category with the defined name + + .EXAMPLE + Get-PokeItemCategory -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemCategory.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/item-category" } + 'index_ById' { $resource_uri = "/item-category/$id" } + 'index_ByName' { $resource_uri = ("/item-category/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_ItemCategoryParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/item/Get-PokeItemFlingEffect.ps1 b/PokeAPI/Public/item/Get-PokeItemFlingEffect.ps1 new file mode 100644 index 0000000..e6c1575 --- /dev/null +++ b/PokeAPI/Public/item/Get-PokeItemFlingEffect.ps1 @@ -0,0 +1,105 @@ +function Get-PokeItemFlingEffect { +<# + .SYNOPSIS + Gets item fling effects from PokeAPI + + .DESCRIPTION + The Get-PokeItemFlingEffect cmdlet gets item fling effects from PokeAPI + + The various effects of the move "Fling" when used with different items + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeItemFlingEffect + + Gets the first 20 item fling effects sorted by id + + .EXAMPLE + Get-PokeItemFlingEffect -id 1 + + Gets the item fling effect with the defined id + + .EXAMPLE + Get-PokeItemFlingEffect -name ditto + + Gets the item fling effect with the defined name + + .EXAMPLE + Get-PokeItemFlingEffect -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemFlingEffect.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/item-fling-effect" } + 'index_ById' { $resource_uri = "/item-fling-effect/$id" } + 'index_ByName' { $resource_uri = ("/item-fling-effect/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_ItemFlingEffectParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/item/Get-PokeItemPocket.ps1 b/PokeAPI/Public/item/Get-PokeItemPocket.ps1 new file mode 100644 index 0000000..881b6eb --- /dev/null +++ b/PokeAPI/Public/item/Get-PokeItemPocket.ps1 @@ -0,0 +1,105 @@ +function Get-PokeItemPocket { +<# + .SYNOPSIS + Gets item pockets from PokeAPI + + .DESCRIPTION + The Get-PokeItemPocket cmdlet gets item pockets from PokeAPI + + Pockets within the players bag used for storing items by category + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeItemPocket + + Gets the first 20 item pockets sorted by id + + .EXAMPLE + Get-PokeItemPocket -id 1 + + Gets the item pocket with the defined id + + .EXAMPLE + Get-PokeItemPocket -name ditto + + Gets the item pocket with the defined name + + .EXAMPLE + Get-PokeItemPocket -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemPocket.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/item-pocket" } + 'index_ById' { $resource_uri = "/item-pocket/$id" } + 'index_ByName' { $resource_uri = ("/item-pocket/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_ItemPocketParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/location/Get-PokeLocation.ps1 b/PokeAPI/Public/location/Get-PokeLocation.ps1 new file mode 100644 index 0000000..b4f8631 --- /dev/null +++ b/PokeAPI/Public/location/Get-PokeLocation.ps1 @@ -0,0 +1,107 @@ +function Get-PokeLocation { +<# + .SYNOPSIS + Gets locations from PokeAPI + + .DESCRIPTION + The Get-PokeLocation cmdlet gets locations from PokeAPI + + Locations that can be visited within the games + + Locations make up sizable portions of regions, like cities or routes + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeLocation + + Gets the first 20 locations sorted by id + + .EXAMPLE + Get-PokeLocation -id 1 + + Gets the location with the defined id + + .EXAMPLE + Get-PokeLocation -name ditto + + Gets the location with the defined name + + .EXAMPLE + Get-PokeLocation -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocation.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/location" } + 'index_ById' { $resource_uri = "/location/$id" } + 'index_ByName' { $resource_uri = ("/location/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_LocationParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/location/Get-PokeLocationArea.ps1 b/PokeAPI/Public/location/Get-PokeLocationArea.ps1 new file mode 100644 index 0000000..2f6f8e4 --- /dev/null +++ b/PokeAPI/Public/location/Get-PokeLocationArea.ps1 @@ -0,0 +1,107 @@ +function Get-PokeLocationArea { +<# + .SYNOPSIS + Gets location areas from PokeAPI + + .DESCRIPTION + The Get-PokeLocationArea cmdlet gets location areas from PokeAPI + + Location areas are sections of areas, such as floors in a building or cave + + Each area has its own set of possible Pokemon encounters + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeLocationArea + + Gets the first 20 location areas sorted by id + + .EXAMPLE + Get-PokeLocationArea -id 1 + + Gets the location area with the defined id + + .EXAMPLE + Get-PokeLocationArea -name ditto + + Gets the location area with the defined name + + .EXAMPLE + Get-PokeLocationArea -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationArea.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/location-area" } + 'index_ById' { $resource_uri = "/location-area/$id" } + 'index_ByName' { $resource_uri = ("/location-area/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_LocationAreaParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/location/Get-PokeLocationPalParkArea.ps1 b/PokeAPI/Public/location/Get-PokeLocationPalParkArea.ps1 new file mode 100644 index 0000000..a8564c6 --- /dev/null +++ b/PokeAPI/Public/location/Get-PokeLocationPalParkArea.ps1 @@ -0,0 +1,107 @@ +function Get-PokeLocationPalParkArea { +<# + .SYNOPSIS + Gets pal park areas from PokeAPI + + .DESCRIPTION + The Get-PokeLocationPalParkArea cmdlet gets pal park areas from PokeAPI + + Areas used for grouping Pokemon encounters in Pal Park + + They're like habitats that are specific to Pal Park + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeLocationPalParkArea + + Gets the first 20 pal park areas sorted by id + + .EXAMPLE + Get-PokeLocationPalParkArea -id 1 + + Gets the pal park area with the defined id + + .EXAMPLE + Get-PokeLocationPalParkArea -name ditto + + Gets the pal park area with the defined name + + .EXAMPLE + Get-PokeLocationPalParkArea -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationPalParkArea.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pal-park-area" } + 'index_ById' { $resource_uri = "/pal-park-area/$id" } + 'index_ByName' { $resource_uri = ("/pal-park-area/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_LocationPalParkAreaParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/location/Get-PokeLocationRegion.ps1 b/PokeAPI/Public/location/Get-PokeLocationRegion.ps1 new file mode 100644 index 0000000..a7a3585 --- /dev/null +++ b/PokeAPI/Public/location/Get-PokeLocationRegion.ps1 @@ -0,0 +1,108 @@ +function Get-PokeLocationRegion { +<# + .SYNOPSIS + Gets regions from PokeAPI + + .DESCRIPTION + The Get-PokeLocationRegion cmdlet gets regions from PokeAPI + + A region is an organized area of the Pokemon world + + Most often, the main difference between regions is the species of + Pokemon that can be encountered within them. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeLocationRegion + + Gets the first 20 regions sorted by id + + .EXAMPLE + Get-PokeLocationRegion -id 1 + + Gets the region with the defined id + + .EXAMPLE + Get-PokeLocationRegion -name ditto + + Gets the region with the defined name + + .EXAMPLE + Get-PokeLocationRegion -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationRegion.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/region" } + 'index_ById' { $resource_uri = "/region/$id" } + 'index_ByName' { $resource_uri = ("/region/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_LocationRegionParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/machine/Get-PokeMachine.ps1 b/PokeAPI/Public/machine/Get-PokeMachine.ps1 new file mode 100644 index 0000000..2c0c4d6 --- /dev/null +++ b/PokeAPI/Public/machine/Get-PokeMachine.ps1 @@ -0,0 +1,95 @@ +function Get-PokeMachine { +<# + .SYNOPSIS + Gets machines from PokeAPI + + .DESCRIPTION + The Get-PokeMachine cmdlet gets machines from PokeAPI + + Machines are the representation of items that teach moves to Pokemon + + They vary from version to version, so it is not certain that one specific + TM or HM corresponds to a single Machine + + .PARAMETER id + Defines id of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeMachine + + Gets the first 20 machines sorted by id + + .EXAMPLE + Get-PokeMachine -id 1 + + Gets the machine with the defined id + + .EXAMPLE + Get-PokeMachine -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/machine/Get-PokeMachine.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/machine" } + 'index_ById' { $resource_uri = "/machine/$id" } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_MachineParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/move/Get-PokeMove.ps1 b/PokeAPI/Public/move/Get-PokeMove.ps1 new file mode 100644 index 0000000..df8ab6d --- /dev/null +++ b/PokeAPI/Public/move/Get-PokeMove.ps1 @@ -0,0 +1,108 @@ +function Get-PokeMove { +<# + .SYNOPSIS + Gets moves from PokeAPI + + .DESCRIPTION + The Get-PokeMove cmdlet gets moves from PokeAPI + + Moves are the skills of Pokemon in battle. In battle, a Pokemon uses one move each turn. + + Some moves (including those learned by Hidden Machine) can be used outside of battle as well, + usually for the purpose of removing obstacles or exploring new areas. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeMove + + Gets the first 20 moves sorted by id + + .EXAMPLE + Get-PokeMove -id 1 + + Gets the move with the defined id + + .EXAMPLE + Get-PokeMove -name ditto + + Gets the move with the defined name + + .EXAMPLE + Get-PokeMove -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMove.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/move" } + 'index_ById' { $resource_uri = "/move/$id" } + 'index_ByName' { $resource_uri = ("/move/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_MoveParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/move/Get-PokeMoveAilment.ps1 b/PokeAPI/Public/move/Get-PokeMoveAilment.ps1 new file mode 100644 index 0000000..04835ca --- /dev/null +++ b/PokeAPI/Public/move/Get-PokeMoveAilment.ps1 @@ -0,0 +1,105 @@ +function Get-PokeMoveAilment { +<# + .SYNOPSIS + Gets move ailments from PokeAPI + + .DESCRIPTION + The Get-PokeMoveAilment cmdlet gets move ailments from PokeAPI + + Move Ailments are status conditions caused by moves used during battle + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeMoveAilment + + Gets the first 20 move ailments sorted by id + + .EXAMPLE + Get-PokeMoveAilment -id 1 + + Gets the move ailment with the defined id + + .EXAMPLE + Get-PokeMoveAilment -name ditto + + Gets the move ailment with the defined name + + .EXAMPLE + Get-PokeMoveAilment -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveAilment.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/move-ailment" } + 'index_ById' { $resource_uri = "/move-ailment/$id" } + 'index_ByName' { $resource_uri = ("/move-ailment/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_MoveAilmentParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/move/Get-PokeMoveBattleStyle.ps1 b/PokeAPI/Public/move/Get-PokeMoveBattleStyle.ps1 new file mode 100644 index 0000000..2219ecb --- /dev/null +++ b/PokeAPI/Public/move/Get-PokeMoveBattleStyle.ps1 @@ -0,0 +1,105 @@ +function Get-PokeMoveBattleStyle { +<# + .SYNOPSIS + Gets move battle styles from PokeAPI + + .DESCRIPTION + The Get-PokeMoveBattleStyle cmdlet gets move battle styles from PokeAPI + + Styles of moves when used in the Battle Palace + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeMoveBattleStyle + + Gets the first 20 move battle styles sorted by id + + .EXAMPLE + Get-PokeMoveBattleStyle -id 1 + + Gets the move battle style with the defined id + + .EXAMPLE + Get-PokeMoveBattleStyle -name ditto + + Gets the move battle style with the defined name + + .EXAMPLE + Get-PokeMoveBattleStyle -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveBattleStyle.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/move-battle-style" } + 'index_ById' { $resource_uri = "/move-battle-style/$id" } + 'index_ByName' { $resource_uri = ("/move-battle-style/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_MoveBattleStyleParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/move/Get-PokeMoveCategory.ps1 b/PokeAPI/Public/move/Get-PokeMoveCategory.ps1 new file mode 100644 index 0000000..11f81fc --- /dev/null +++ b/PokeAPI/Public/move/Get-PokeMoveCategory.ps1 @@ -0,0 +1,105 @@ +function Get-PokeMoveCategory { +<# + .SYNOPSIS + Gets move categories from PokeAPI + + .DESCRIPTION + The Get-PokeMoveCategory cmdlet gets move categories from PokeAPI + + Very general categories that loosely group move effects + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeMoveCategory + + Gets the first 20 move categories sorted by id + + .EXAMPLE + Get-PokeMoveCategory -id 1 + + Gets the move category with the defined id + + .EXAMPLE + Get-PokeMoveCategory -name ditto + + Gets the move category with the defined name + + .EXAMPLE + Get-PokeMoveCategory -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveCategory.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/move-category" } + 'index_ById' { $resource_uri = "/move-category/$id" } + 'index_ByName' { $resource_uri = ("/move-category/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_MoveCategoryParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/move/Get-PokeMoveDamageClass.ps1 b/PokeAPI/Public/move/Get-PokeMoveDamageClass.ps1 new file mode 100644 index 0000000..d624e99 --- /dev/null +++ b/PokeAPI/Public/move/Get-PokeMoveDamageClass.ps1 @@ -0,0 +1,105 @@ +function Get-PokeMoveDamageClass { +<# + .SYNOPSIS + Gets move damage classes from PokeAPI + + .DESCRIPTION + The Get-PokeMoveDamageClass cmdlet gets move damage classes from PokeAPI + + Damage classes moves can have, e.g. physical, special, or non-damaging + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeMoveDamageClass + + Gets the first 20 move damage classes sorted by id + + .EXAMPLE + Get-PokeMoveDamageClass -id 1 + + Gets the move damage class with the defined id + + .EXAMPLE + Get-PokeMoveDamageClass -name ditto + + Gets the move damage class with the defined name + + .EXAMPLE + Get-PokeMoveDamageClass -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveDamageClass.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/move-damage-class" } + 'index_ById' { $resource_uri = "/move-damage-class/$id" } + 'index_ByName' { $resource_uri = ("/move-damage-class/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_MoveDamageClassParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/move/Get-PokeMoveLearnMethod.ps1 b/PokeAPI/Public/move/Get-PokeMoveLearnMethod.ps1 new file mode 100644 index 0000000..0b05101 --- /dev/null +++ b/PokeAPI/Public/move/Get-PokeMoveLearnMethod.ps1 @@ -0,0 +1,105 @@ +function Get-PokeMoveLearnMethod { +<# + .SYNOPSIS + Gets move learn methods from PokeAPI + + .DESCRIPTION + The Get-PokeMoveLearnMethod cmdlet gets move learn methods from PokeAPI + + Methods by which Pokemon can learn moves + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeMoveLearnMethod + + Gets the first 20 move learn methods sorted by id + + .EXAMPLE + Get-PokeMoveLearnMethod -id 1 + + Gets the move learn method with the defined id + + .EXAMPLE + Get-PokeMoveLearnMethod -name ditto + + Gets the move learn method with the defined name + + .EXAMPLE + Get-PokeMoveLearnMethod -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveLearnMethod.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/move-learn-method" } + 'index_ById' { $resource_uri = "/move-learn-method/$id" } + 'index_ByName' { $resource_uri = ("/move-learn-method/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_MoveLearnMethodParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/move/Get-PokeMoveTarget.ps1 b/PokeAPI/Public/move/Get-PokeMoveTarget.ps1 new file mode 100644 index 0000000..da077f5 --- /dev/null +++ b/PokeAPI/Public/move/Get-PokeMoveTarget.ps1 @@ -0,0 +1,107 @@ +function Get-PokeMoveTarget { +<# + .SYNOPSIS + Gets move targets from PokeAPI + + .DESCRIPTION + The Get-PokeMoveTarget cmdlet gets move targets from PokeAPI + + Targets moves can be directed at during battle + + Targets can be Pokemon, environments or even other moves. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeMoveTarget + + Gets the first 20 move targets sorted by id + + .EXAMPLE + Get-PokeMoveTarget -id 1 + + Gets the move target with the defined id + + .EXAMPLE + Get-PokeMoveTarget -name ditto + + Gets the move target with the defined name + + .EXAMPLE + Get-PokeMoveTarget -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveTarget.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/move-target" } + 'index_ById' { $resource_uri = "/move-target/$id" } + 'index_ByName' { $resource_uri = ("/move-target/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_MoveTargetParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/pokemon/Get-PokePokemon.ps1 b/PokeAPI/Public/pokemon/Get-PokePokemon.ps1 new file mode 100644 index 0000000..2931089 --- /dev/null +++ b/PokeAPI/Public/pokemon/Get-PokePokemon.ps1 @@ -0,0 +1,109 @@ +function Get-PokePokemon { +<# + .SYNOPSIS + Gets Pokemon from PokeAPI + + .DESCRIPTION + The Get-PokePokemon cmdlet gets Pokemon from PokeAPI + + Pokemon are the creatures that inhabit the world of the Pokemon games. + They can be caught using Pokeballs and trained by battling with other Pokemon. + Each Pokemon belongs to a specific species but may take on a variant which makes + it differ from other Pokemon of the same species, such as base stats, + available abilities and typings. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemon + + Gets the first 20 pokemon sorted by id + + .EXAMPLE + Get-PokePokemon -id 1 + + Gets the pokemon with the defined id + + .EXAMPLE + Get-PokePokemon -name ditto + + Gets the pokemon with the defined name + + .EXAMPLE + Get-PokePokemon -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemon.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pokemon" } + 'index_ById' { $resource_uri = "/pokemon/$id" } + 'index_ByName' { $resource_uri = ("/pokemon/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/pokemon/Get-PokePokemonAbility.ps1 b/PokeAPI/Public/pokemon/Get-PokePokemonAbility.ps1 new file mode 100644 index 0000000..6f2f182 --- /dev/null +++ b/PokeAPI/Public/pokemon/Get-PokePokemonAbility.ps1 @@ -0,0 +1,106 @@ +function Get-PokePokemonAbility { +<# + .SYNOPSIS + Gets Pokemon abilities from PokeAPI + + .DESCRIPTION + The Get-PokePokemonAbility cmdlet gets Pokemon abilities from PokeAPI + + Abilities provide passive effects for Pokemon in battle or in the overworld. + Pokemon have multiple possible abilities but can have only one ability at a time + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonAbility + + Gets the first 20 Pokemon abilities sorted by id + + .EXAMPLE + Get-PokePokemonAbility -id 1 + + Gets the Pokemon ability with the defined id + + .EXAMPLE + Get-PokePokemonAbility -name ditto + + Gets the Pokemon ability with the defined name + + .EXAMPLE + Get-PokePokemonAbility -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonAbility.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/ability" } + 'index_ById' { $resource_uri = "/ability/$id" } + 'index_ByName' { $resource_uri = ("/ability/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonAbilityParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/pokemon/Get-PokePokemonCharacteristic.ps1 b/PokeAPI/Public/pokemon/Get-PokePokemonCharacteristic.ps1 new file mode 100644 index 0000000..cf3c5c9 --- /dev/null +++ b/PokeAPI/Public/pokemon/Get-PokePokemonCharacteristic.ps1 @@ -0,0 +1,108 @@ +function Get-PokePokemonCharacteristic { +<# + .SYNOPSIS + Gets Pokemon characteristics from PokeAPI + + .DESCRIPTION + The Get-PokePokemonCharacteristic cmdlet gets + Pokemon characteristics from PokeAPI + + Characteristics indicate which stat contains a Pokemon's highest IV. + A Pokemon's Characteristic is determined by the remainder + of its highest IV divided by 5 (gene_modulo). + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonCharacteristic + + Gets the first 20 Pokemon characteristics sorted by id + + .EXAMPLE + Get-PokePokemonCharacteristic -id 1 + + Gets the Pokemon characteristic with the defined id + + .EXAMPLE + Get-PokePokemonCharacteristic -name ditto + + Gets the Pokemon characteristic with the defined name + + .EXAMPLE + Get-PokePokemonCharacteristic -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonCharacteristic.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/characteristic" } + 'index_ById' { $resource_uri = "/characteristic/$id" } + 'index_ByName' { $resource_uri = ("/characteristic/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonCharacteristicParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/pokemon/Get-PokePokemonColor.ps1 b/PokeAPI/Public/pokemon/Get-PokePokemonColor.ps1 new file mode 100644 index 0000000..400c4ec --- /dev/null +++ b/PokeAPI/Public/pokemon/Get-PokePokemonColor.ps1 @@ -0,0 +1,107 @@ +function Get-PokePokemonColor { +<# + .SYNOPSIS + Gets pokemon colors from PokeAPI + + .DESCRIPTION + The Get-PokePokemonColor cmdlet gets pokemon colors from PokeAPI + + Colors used for sorting Pokemon in a Pokedex. The color listed in the Pokedex + is usually the color most apparent or covering each Pokemon's body. + No orange category exists; Pokemon that are primarily orange are listed as red or brown. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonColor + + Gets the first 20 pokemon colors sorted by id + + .EXAMPLE + Get-PokePokemonColor -id 1 + + Gets the pokemon color with the defined id + + .EXAMPLE + Get-PokePokemonColor -name ditto + + Gets the pokemon color with the defined name + + .EXAMPLE + Get-PokePokemonColor -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonColor.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pokemon-color" } + 'index_ById' { $resource_uri = "/pokemon-color/$id" } + 'index_ByName' { $resource_uri = ("/pokemon-color/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonColorParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/pokemon/Get-PokePokemonEggGroup.ps1 b/PokeAPI/Public/pokemon/Get-PokePokemonEggGroup.ps1 new file mode 100644 index 0000000..2decab4 --- /dev/null +++ b/PokeAPI/Public/pokemon/Get-PokePokemonEggGroup.ps1 @@ -0,0 +1,106 @@ +function Get-PokePokemonEggGroup { +<# + .SYNOPSIS + Gets egg groups from PokeAPI + + .DESCRIPTION + The Get-PokePokemonEggGroup cmdlet gets egg groups from PokeAPI + + Egg Groups are categories which determine which Pokemon are + able to interbreed. Pokemon may belong to either one or two Egg Groups + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonEggGroup + + Gets the first 20 egg groups sorted by id + + .EXAMPLE + Get-PokePokemonEggGroup -id 1 + + Gets the egg group with the defined id + + .EXAMPLE + Get-PokePokemonEggGroup -name ditto + + Gets the egg group with the defined name + + .EXAMPLE + Get-PokePokemonEggGroup -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonEggGroup.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/egg-group" } + 'index_ById' { $resource_uri = "/egg-group/$id" } + 'index_ByName' { $resource_uri = ("/egg-group/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonEggGroupParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/pokemon/Get-PokePokemonEncounter.ps1 b/PokeAPI/Public/pokemon/Get-PokePokemonEncounter.ps1 new file mode 100644 index 0000000..3241035 --- /dev/null +++ b/PokeAPI/Public/pokemon/Get-PokePokemonEncounter.ps1 @@ -0,0 +1,64 @@ +function Get-PokePokemonEncounter { +<# + .SYNOPSIS + Gets pokemon location areas from PokeAPI + + .DESCRIPTION + The Get-PokePokemonEncounter cmdlet gets pokemon location areas from PokeAPI + + Pokemon Location Areas are ares where Pokemon can be found + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .EXAMPLE + Get-PokePokemonEncounter -id 1 + + Gets the pokemon location area with the defined id + + .EXAMPLE + Get-PokePokemonEncounter -name ditto + + Gets the pokemon location area with the defined name + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonEncounter.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ById')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ById' { $resource_uri = "/pokemon/$id/encounters" } + 'index_ByName' { $resource_uri = ("/pokemon/$name/encounters").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonEncountersParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/pokemon/Get-PokePokemonForm.ps1 b/PokeAPI/Public/pokemon/Get-PokePokemonForm.ps1 new file mode 100644 index 0000000..7c9e9da --- /dev/null +++ b/PokeAPI/Public/pokemon/Get-PokePokemonForm.ps1 @@ -0,0 +1,108 @@ +function Get-PokeBerry { +<# + .SYNOPSIS + Gets pokemon forms from PokeAPI + + .DESCRIPTION + The Get-PokeBerry cmdlet gets pokemon forms from PokeAPI + + Some Pokemon may appear in one of multiple, visually different forms. + These differences are purely cosmetic. For variations within a Pokemon species, + which do differ in more than just visuals, the + 'Pokemon' entity is used to represent such a variety. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeBerry + + Gets the first 20 pokemon forms sorted by id + + .EXAMPLE + Get-PokeBerry -id 1 + + Gets the pokemon form with the defined id + + .EXAMPLE + Get-PokeBerry -name ditto + + Gets the pokemon form with the defined name + + .EXAMPLE + Get-PokeBerry -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokeBerry.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pokemon-form" } + 'index_ById' { $resource_uri = "/pokemon-form/$id" } + 'index_ByName' { $resource_uri = ("/pokemon-form/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonFormParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/pokemon/Get-PokePokemonGender.ps1 b/PokeAPI/Public/pokemon/Get-PokePokemonGender.ps1 new file mode 100644 index 0000000..1f98d62 --- /dev/null +++ b/PokeAPI/Public/pokemon/Get-PokePokemonGender.ps1 @@ -0,0 +1,107 @@ +function Get-PokePokemonGender { +<# + .SYNOPSIS + Gets genders from PokeAPI + + .DESCRIPTION + The Get-PokePokemonGender cmdlet gets genders from PokeAPI + + Genders were introduced in Generation II for the purposes of + breeding Pokemon but can also result in visual differences or + even different evolutionary lines + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonGender + + Gets the first 20 genders sorted by id + + .EXAMPLE + Get-PokePokemonGender -id 1 + + Gets the gender with the defined id + + .EXAMPLE + Get-PokePokemonGender -name ditto + + Gets the gender with the defined name + + .EXAMPLE + Get-PokePokemonGender -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonGender.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/gender" } + 'index_ById' { $resource_uri = "/gender/$id" } + 'index_ByName' { $resource_uri = ("/gender/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonGenderParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/pokemon/Get-PokePokemonGrowthRate.ps1 b/PokeAPI/Public/pokemon/Get-PokePokemonGrowthRate.ps1 new file mode 100644 index 0000000..607a59a --- /dev/null +++ b/PokeAPI/Public/pokemon/Get-PokePokemonGrowthRate.ps1 @@ -0,0 +1,105 @@ +function Get-PokePokemonGrowthRate { +<# + .SYNOPSIS + Gets growth rates from PokeAPI + + .DESCRIPTION + The Get-PokePokemonGrowthRate cmdlet gets growth rates from PokeAPI + + Growth rates are the speed with which Pokemon gain levels through experience + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonGrowthRate + + Gets the first 20 growth rates sorted by id + + .EXAMPLE + Get-PokePokemonGrowthRate -id 1 + + Gets the growth rate with the defined id + + .EXAMPLE + Get-PokePokemonGrowthRate -name ditto + + Gets the growth rate with the defined name + + .EXAMPLE + Get-PokePokemonGrowthRate -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonGrowthRate.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/growth-rate" } + 'index_ById' { $resource_uri = "/growth-rate/$id" } + 'index_ByName' { $resource_uri = ("/growth-rate/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonGrowthRateParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/pokemon/Get-PokePokemonHabitat.ps1 b/PokeAPI/Public/pokemon/Get-PokePokemonHabitat.ps1 new file mode 100644 index 0000000..5c1c7c2 --- /dev/null +++ b/PokeAPI/Public/pokemon/Get-PokePokemonHabitat.ps1 @@ -0,0 +1,106 @@ +function Get-PokePokemonHabitat { +<# + .SYNOPSIS + Gets pokemon habitats from PokeAPI + + .DESCRIPTION + The Get-PokePokemonHabitat cmdlet gets pokemon habitats from PokeAPI + + Habitats are generally different terrain Pokemon can be found + in but can also be areas designated for rare or legendary Pokemon. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonHabitat + + Gets the first 20 pokemon habitats sorted by id + + .EXAMPLE + Get-PokePokemonHabitat -id 1 + + Gets the pokemon habitat with the defined id + + .EXAMPLE + Get-PokePokemonHabitat -name ditto + + Gets the pokemon habitat with the defined name + + .EXAMPLE + Get-PokePokemonHabitat -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonHabitat.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pokemon-habitat" } + 'index_ById' { $resource_uri = "/pokemon-habitat/$id" } + 'index_ByName' { $resource_uri = ("/pokemon-habitat/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonHabitatParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/pokemon/Get-PokePokemonNature.ps1 b/PokeAPI/Public/pokemon/Get-PokePokemonNature.ps1 new file mode 100644 index 0000000..deb8524 --- /dev/null +++ b/PokeAPI/Public/pokemon/Get-PokePokemonNature.ps1 @@ -0,0 +1,105 @@ +function Get-PokePokemonNature { +<# + .SYNOPSIS + Gets natures from PokeAPI + + .DESCRIPTION + The Get-PokePokemonNature cmdlet gets natures from PokeAPI + + Natures influence how a Pokemon's stats grow + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonNature + + Gets the first 20 natures sorted by id + + .EXAMPLE + Get-PokePokemonNature -id 1 + + Gets the nature with the defined id + + .EXAMPLE + Get-PokePokemonNature -name ditto + + Gets the nature with the defined name + + .EXAMPLE + Get-PokePokemonNature -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonNature.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/nature" } + 'index_ById' { $resource_uri = "/nature/$id" } + 'index_ByName' { $resource_uri = ("/nature/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonNatureParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/pokemon/Get-PokePokemonPokeathlonStat.ps1 b/PokeAPI/Public/pokemon/Get-PokePokemonPokeathlonStat.ps1 new file mode 100644 index 0000000..25d5ed2 --- /dev/null +++ b/PokeAPI/Public/pokemon/Get-PokePokemonPokeathlonStat.ps1 @@ -0,0 +1,107 @@ +function Get-PokePokemonPokeathlonStat { +<# + .SYNOPSIS + Gets pokeathlon stats from PokeAPI + + .DESCRIPTION + The Get-PokePokemonPokeathlonStat cmdlet gets pokeathlon stats from PokeAPI + + Pokeathlon Stats are different attributes of a Pokemon's performance in Pokeathlons. + In Pokeathlons, competitions happen on different courses; one for each + of the different Pokeathlon stats + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonPokeathlonStat + + Gets the first 20 pokeathlon stats sorted by id + + .EXAMPLE + Get-PokePokemonPokeathlonStat -id 1 + + Gets the pokeathlon stat with the defined id + + .EXAMPLE + Get-PokePokemonPokeathlonStat -name ditto + + Gets the pokeathlon stat with the defined name + + .EXAMPLE + Get-PokePokemonPokeathlonStat -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonPokeathlonStat.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pokeathlon-stat" } + 'index_ById' { $resource_uri = "/pokeathlon-stat/$id" } + 'index_ByName' { $resource_uri = ("/pokeathlon-stat/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonPokeathlonStatParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/pokemon/Get-PokePokemonShape.ps1 b/PokeAPI/Public/pokemon/Get-PokePokemonShape.ps1 new file mode 100644 index 0000000..b6dd645 --- /dev/null +++ b/PokeAPI/Public/pokemon/Get-PokePokemonShape.ps1 @@ -0,0 +1,105 @@ +function Get-PokePokemonShape { +<# + .SYNOPSIS + Gets pokemon shapes from PokeAPI + + .DESCRIPTION + The Get-PokePokemonShape cmdlet gets pokemon shapes from PokeAPI + + Shapes used for sorting Pokemon in a Pokedex + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonShape + + Gets the first 20 pokemon shapes sorted by id + + .EXAMPLE + Get-PokePokemonShape -id 1 + + Gets the pokemon shape with the defined id + + .EXAMPLE + Get-PokePokemonShape -name ditto + + Gets the pokemon shape with the defined name + + .EXAMPLE + Get-PokePokemonShape -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonShape.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pokemon-shape" } + 'index_ById' { $resource_uri = "/pokemon-shape/$id" } + 'index_ByName' { $resource_uri = ("/pokemon-shape/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonShapeParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/pokemon/Get-PokePokemonSpecies.ps1 b/PokeAPI/Public/pokemon/Get-PokePokemonSpecies.ps1 new file mode 100644 index 0000000..472da9f --- /dev/null +++ b/PokeAPI/Public/pokemon/Get-PokePokemonSpecies.ps1 @@ -0,0 +1,109 @@ +function Get-PokePokemonSpecies { +<# + .SYNOPSIS + Gets pokemon species from PokeAPI + + .DESCRIPTION + The Get-PokePokemonSpecies cmdlet gets pokemon species from PokeAPI + + A Pokemon Species forms the basis for at least one Pokemon. Attributes of a + Pokemon species are shared across all varieties of Pokemon within the species. + + A good example is Wormadam; Wormadam is the species which can be found in three + different varieties, Wormadam-Trash, Wormadam-Sandy and Wormadam-Plant. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonSpecies + + Gets the first 20 pokemon species sorted by id + + .EXAMPLE + Get-PokePokemonSpecies -id 1 + + Gets the pokemon species with the defined id + + .EXAMPLE + Get-PokePokemonSpecies -name ditto + + Gets the pokemon species with the defined name + + .EXAMPLE + Get-PokePokemonSpecies -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonSpecies.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pokemon-species" } + 'index_ById' { $resource_uri = "/pokemon-species/$id" } + 'index_ByName' { $resource_uri = ("/pokemon-species/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonSpeciesParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/pokemon/Get-PokePokemonStat.ps1 b/PokeAPI/Public/pokemon/Get-PokePokemonStat.ps1 new file mode 100644 index 0000000..04efa58 --- /dev/null +++ b/PokeAPI/Public/pokemon/Get-PokePokemonStat.ps1 @@ -0,0 +1,107 @@ +function Get-PokePokemonStat { +<# + .SYNOPSIS + Gets pokemon stats from PokeAPI + + .DESCRIPTION + The Get-PokePokemonStat cmdlet gets pokemon stats from PokeAPI + + Stats determine certain aspects of battles. Each Pokemon has a + value for each stat which grows as they gain levels and can be + altered momentarily by effects in battles. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonStat + + Gets the first 20 pokemon stats sorted by id + + .EXAMPLE + Get-PokePokemonStat -id 1 + + Gets the pokemon stat with the defined id + + .EXAMPLE + Get-PokePokemonStat -name ditto + + Gets the pokemon stat with the defined name + + .EXAMPLE + Get-PokePokemonStat -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonStat.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/stat" } + 'index_ById' { $resource_uri = "/stat/$id" } + 'index_ByName' { $resource_uri = ("/stat/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonStatParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/pokemon/Get-PokePokemonType.ps1 b/PokeAPI/Public/pokemon/Get-PokePokemonType.ps1 new file mode 100644 index 0000000..02faae9 --- /dev/null +++ b/PokeAPI/Public/pokemon/Get-PokePokemonType.ps1 @@ -0,0 +1,108 @@ +function Get-PokePokemonType { +<# + .SYNOPSIS + Gets pokemon move type properties from PokeAPI + + .DESCRIPTION + The Get-PokePokemonType cmdlet gets pokemon move type properties from PokeAPI + + Types are properties for Pokemon and their moves. Each type has + three properties: which types of Pokemon it is super effective against, + which types of Pokemon it is not very effective against, and which + types of Pokemon it is completely ineffective against. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonType + + Gets the first 20 pokemon move type properties sorted by id + + .EXAMPLE + Get-PokePokemonType -id 1 + + Gets the pokemon move type property with the defined id + + .EXAMPLE + Get-PokePokemonType -name ditto + + Gets the pokemon move type property with the defined name + + .EXAMPLE + Get-PokePokemonType -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonType.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/type" } + 'index_ById' { $resource_uri = "/type/$id" } + 'index_ByName' { $resource_uri = ("/type/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonTypeParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/PokeAPI/Public/utility/Get-PokeEndpoint.ps1 b/PokeAPI/Public/utility/Get-PokeEndpoint.ps1 new file mode 100644 index 0000000..6c428c4 --- /dev/null +++ b/PokeAPI/Public/utility/Get-PokeEndpoint.ps1 @@ -0,0 +1,50 @@ +function Get-PokeEndpoint { +<# + .SYNOPSIS + Gets endpoints from PokeAPI + + .DESCRIPTION + The Get-PokeEndpoint cmdlet gets endpoints from PokeAPI + + + .EXAMPLE + Get-PokeEndpoint + + Gets the endpoints from PokeAPI + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/utility/Get-PokeEndpoint.html +#> + + [CmdletBinding()] + Param () + + begin { + $PokeAPI_Endpoints = [System.Collections.Generic.List[object]]::new() + } + + process { + + $invoke_Request = Invoke-RestMethod -Uri "$Poke_Base_URI/" + + foreach ($property in $invoke_Request.PSObject.Properties) { + + $data = [PSCustomObject]@{ + name = $property.name + url = $property.value + } + + $PokeAPI_Endpoints.add($data) + + } + + $PokeAPI_Endpoints + + } + + end {} + +} diff --git a/PokeAPI/Public/utility/Get-PokeLanguage.ps1 b/PokeAPI/Public/utility/Get-PokeLanguage.ps1 new file mode 100644 index 0000000..8b1f071 --- /dev/null +++ b/PokeAPI/Public/utility/Get-PokeLanguage.ps1 @@ -0,0 +1,105 @@ +function Get-PokeLanguage { +<# + .SYNOPSIS + Gets languages from PokeAPI + + .DESCRIPTION + The Get-PokeLanguage cmdlet gets languages from PokeAPI + + Languages for translations of API resource information + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeLanguage + + Gets the first 20 languages sorted by id + + .EXAMPLE + Get-PokeLanguage -id 1 + + Gets the language with the defined id + + .EXAMPLE + Get-PokeLanguage -name ditto + + Gets the language with the defined name + + .EXAMPLE + Get-PokeLanguage -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/utility/Get-PokeLanguage.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/language" } + 'index_ById' { $resource_uri = "/language/$id" } + 'index_ByName' { $resource_uri = ("/language/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_LanguageParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} diff --git a/README.md b/README.md new file mode 100644 index 0000000..e442e22 --- /dev/null +++ b/README.md @@ -0,0 +1,361 @@ +

+
+ _CeleriumDemo +
+ Celerium_PokeAPI +
+

+ +[![Az_Pipeline][Az_Pipeline-shield]][Az_Pipeline-url] +[![GitHub_Pages][GitHub_Pages-shield]][GitHub_Pages-url] + +[![PoshGallery_Version][PoshGallery_Version-shield]][PoshGallery_Version-url] +[![PoshGallery_Platforms][PoshGallery_Platforms-shield]][PoshGallery_Platforms-url] +[![PoshGallery_Downloads][PoshGallery_Downloads-shield]][PoshGallery_Downloads-url] +[![codeSize][codeSize-shield]][codeSize-url] + +[![Contributors][contributors-shield]][contributors-url] +[![Forks][forks-shield]][forks-url] +[![Stargazers][stars-shield]][stars-url] +[![Issues][issues-shield]][issues-url] + +[![Blog][Website-shield]][Website-url] +[![GitHub_License][GitHub_License-shield]][GitHub_License-url] +--- + +## Buy me a coffee + +Whether you use this project, have learned something from it, or just like it, please consider supporting it by buying me a coffee, so I can dedicate more time on open-source projects like this :) + +Buy Me A Coffee + +--- + + + + +
+ + +--- + + + +## About The Project + +The [PokeAPI](https://pokeapi.co/) offers users the ability to extract data from Poke into third-party reporting tools and aims to abstract away the details of interacting with Poke's API endpoints in such a way that is consistent with PowerShell nomenclature. This gives system administrators and PowerShell developers a convenient and familiar way of using Poke's API to create documentation scripts, automation, and integrations. + +- :book: Project documentation can be found on [Github Pages](https://celerium.github.io/PokeAPI-PowerShellWrapper/) +- :book: Poke's REST API documentation on their website [here](https://pokeapi.co/docs/v2). + +Poke features a REST API that makes use of common HTTP request methods. In order to maintain PowerShell best practices, only approved verbs are used. + +- GET -> Get- + +Additionally, PowerShell's `verb-noun` nomenclature is respected. Each noun is prefixed with `Poke` in an attempt to prevent naming problems. + +For example, one might access the `/pokemon/` endpoint by running the following PowerShell command with the appropriate parameters: + +```posh +Get-PokePokemon -id 1 +``` + +

(back to top)

+ +## Install + +This module can be installed directly from the [PowerShell Gallery](https://www.powershellgallery.com/packages/PokeAPI) with the following command: + +```posh +Install-Module -Name PokeAPI +``` + +- :information_source: This module supports PowerShell 5.0+ and *should* work in PowerShell Core. +- :information_source: If you are running an older version of PowerShell, or if PowerShellGet is unavailable, you can manually download the *main* branch and place the *PokeAPI* folder into the (default) `C:\Program Files\WindowsPowerShell\Modules` folder. + +Project documentation can be found on [Github Pages](https://celerium.github.io/PokeAPI-PowerShellWrapper/) + +- A full list of functions can be retrieved by running `Get-Command -Module PokeAPI`. +- Help info and a list of parameters can be found by running `Get-Help `, such as: + +```posh +Get-Help Get-PokePokemon +Get-Help Get-PokePokemon -Full +``` + +

(back to top)

+ +## Initial Setup + +After installing this module, you will need to configure both the *base URI* & *API access tokens* that are used to talk with the Poke API. + +1. Run `Add-PokeBaseURI` + - By default, Poke's `https://pokeapi.co/api/v2` URI is used. + - If you have your own API gateway or proxy, you may put in your own custom URI by specifying the `-base_uri` parameter: + - `Add-PokeBaseURI -base_uri http://myapi.gateway.celerium.org` +
+ +2. [**optional**] Run `Export-PokeModuleSettings` + - This will create a config file at `%UserProfile%\PokeAPI` that holds the *base uri* & *API access tokens* information. + - Next time you run `Import-Module -Name PokeAPI`, this configuration file will automatically be loaded. + +

(back to top)

+ +## Usage + +Calling an API resource is as simple as running `Get-Poke` + +- The following is a table of supported functions and their corresponding API resources: +- Table entries with [ `-` ] indicate that the functionality is **NOT** supported by the Poke API at this time. + +|Category |EndpointUri |Method|Function | +|---------|----------------------------------------|------|-------------------------------| +|berry |/berry/ |GET |Get-PokeBerry | +|berry |/berry/{id or name}/ |GET |Get-PokeBerry | +|berry |/berry-firmness |GET |Get-PokeBerryFirmness | +|berry |/berry-firmness/{id or name}/ |GET |Get-PokeBerryFirmness | +|berry |/berry-flavor/ |GET |Get-PokeBerryFlavor | +|berry |/berry-flavor/{id or name}/ |GET |Get-PokeBerryFlavor | +|contest |/contest-type/ |GET |Get-PokeContestType | +|contest |/contest-type/{id or name}/ |GET |Get-PokeContestType | +|contest |/contest-effect/ |GET |Get-PokeContestEffect | +|contest |/contest-effect/{id}/ |GET |Get-PokeContestEffect | +|contest |/super-contest-effect/ |GET |Get-PokeContestSuperEffect | +|contest |/super-contest-effect/{id}/ |GET |Get-PokeContestSuperEffect | +|encounter|/encounter-method/ |GET |Get-PokeEncounterMethod | +|encounter|/encounter-method/{id or name}/ |GET |Get-PokeEncounterMethod | +|encounter|/encounter-condition/ |GET |Get-PokeEncounterCondition | +|encounter|/encounter-condition/{id or name}/ |GET |Get-PokeEncounterCondition | +|encounter|/encounter-condition-value/{id or name}/|GET |Get-PokeEncounterConditionValue| +|encounter|/encounter-condition-value/{id or name}/|GET |Get-PokeEncounterConditionValue| +|evolution|/evolution-chain/ |GET |Get-PokeEvolutionChain | +|evolution|/evolution-chain/{id}/ |GET |Get-PokeEvolutionChain | +|evolution|/evolution-trigger/ |GET |Get-PokeEvolutionTrigger | +|evolution|/evolution-trigger/{id or name}/ |GET |Get-PokeEvolutionTrigger | +|game |/generation/ |GET |Get-PokeGameGeneration | +|game |/generation/{id or name}/ |GET |Get-PokeGameGeneration | +|game |/pokedex/ |GET |Get-PokeGamePokedex | +|game |/pokedex/{id or name}/ |GET |Get-PokeGamePokedex | +|game |/version/ |GET |Get-PokeGameVersion | +|game |/version/{id or name}/ |GET |Get-PokeGameVersion | +|game |/version-group/ |GET |Get-PokeGameVersionGroup | +|game |/version-group/{id or name}/ |GET |Get-PokeGameVersionGroup | +|Internal | |POST |Add-PokeBaseURI | +|Internal | |PUT |ConvertTo-PokeQueryString | +|Internal | |GET |Export-PokeModuleSettings | +|Internal | |GET |Get-PokeBaseURI | +|Internal | |GET |Get-PokeMetaData | +|Internal | |GET |Get-PokeModuleSettings | +|Internal | |SET |Import-PokeModuleSettings | +|Internal | |GET |Invoke-PokeRequest | +|Internal | |DELETE|Remove-PokeBaseURI | +|Internal | |DELETE|Remove-PokeModuleSettings | +|item |/item/ |GET |Get-PokeItem | +|item |/item/{id or name}/ |GET |Get-PokeItem | +|item |/item-attribute/ |GET |Get-PokeItemAttribute | +|item |/item-attribute/{id or name}/ |GET |Get-PokeItemAttribute | +|item |/item-category/ |GET |Get-PokeItemCategory | +|item |/item-category/{id or name}/ |GET |Get-PokeItemCategory | +|item |/item-fling-effect/ |GET |Get-PokeItemFlingEffect | +|item |/item-fling-effect/{id or name}/ |GET |Get-PokeItemFlingEffect | +|item |/item-pocket/ |GET |Get-PokeItemPocket | +|item |/item-pocket/{id or name}/ |GET |Get-PokeItemPocket | +|location |/location/ |GET |Get-PokeLocation | +|location |/location/{id or name}/ |GET |Get-PokeLocation | +|location |/location-area/ |GET |Get-PokeLocationArea | +|location |/location-area/{id or name}/ |GET |Get-PokeLocationArea | +|location |/pal-park-area/ |GET |Get-PokeLocationPalParkArea | +|location |/pal-park-area/{id or name}/ |GET |Get-PokeLocationPalParkArea | +|location |/region/ |GET |Get-PokeLocationRegion | +|location |/region/{id or name}/ |GET |Get-PokeLocationRegion | +|machine |/machine/ |GET |Get-PokeMachine | +|machine |/machine/{id}/ |GET |Get-PokeMachine | +|move |/move/ |GET |Get-PokeMove | +|move |/move/{id or name}/ |GET |Get-PokeMove | +|move |/move-ailment/ |GET |Get-PokeMoveAilment | +|move |/move-ailment/{id or name}/ |GET |Get-PokeMoveAilment | +|move |/move-battle-style/ |GET |Get-PokeMoveBattleStyle | +|move |/move-battle-style/{id or name}/ |GET |Get-PokeMoveBattleStyle | +|move |/move-category/ |GET |Get-PokeMoveCategory | +|move |/move-category/{id or name}/ |GET |Get-PokeMoveCategory | +|move |/move-damage-class/ |GET |Get-PokeMoveDamageClass | +|move |/move-damage-class/{id or name}/ |GET |Get-PokeMoveDamageClass | +|move |/move-learn-method/ |GET |Get-PokeMoveLearnMethod | +|move |/move-learn-method/{id or name}/ |GET |Get-PokeMoveLearnMethod | +|move |/move-target/ |GET |Get-PokeMoveTarget | +|move |/move-target/{id or name}/ |GET |Get-PokeMoveTarget | +|pokemon |/ability/ |GET |Get-PokePokemonAbility | +|pokemon |/ability/{id or name}/ |GET |Get-PokePokemonAbility | +|pokemon |/characteristic/ |GET |Get-PokePokemonCharacteristic | +|pokemon |/characteristic/{id}/ |GET |Get-PokePokemonCharacteristic | +|pokemon |/egg-group/ |GET |Get-PokePokemonEggGroup | +|pokemon |/egg-group/{id or name}/ |GET |Get-PokePokemonEggGroup | +|pokemon |/gender/ |GET |Get-PokePokemonGender | +|pokemon |/gender/{id or name}/ |GET |Get-PokePokemonGender | +|pokemon |/growth-rate/ |GET |Get-PokePokemonGrowthRate | +|pokemon |/growth-rate/{id or name}/ |GET |Get-PokePokemonGrowthRate | +|pokemon |/nature/ |GET |Get-PokePokemonNature | +|pokemon |/nature/{id or name}/ |GET |Get-PokePokemonNature | +|pokemon |/pokeathlon-stat/ |GET |Get-PokePokemonPokeathlonStat | +|pokemon |/pokeathlon-stat/{id or name}/ |GET |Get-PokePokemonPokeathlonStat | +|pokemon |/pokemon/ |GET |Get-PokePokemon | +|pokemon |/pokemon/{id or name}/ |GET |Get-PokePokemon | +|pokemon |/pokemon/{id or name}/encounters |GET |Get-PokePokemonEncounter | +|pokemon |/pokemon-color/ |GET |Get-PokePokemonColor | +|pokemon |/pokemon-color/{id or name}/ |GET |Get-PokePokemonColor | +|pokemon |/pokemon-form/ |GET |Get-PokePokemonForm | +|pokemon |/pokemon-form/{id or name}/ |GET |Get-PokePokemonForm | +|pokemon |/pokemon-habitat/ |GET |Get-PokePokemonHabitat | +|pokemon |/pokemon-habitat/{id or name}/ |GET |Get-PokePokemonHabitat | +|pokemon |/pokemon-shape/ |GET |Get-PokePokemonShape | +|pokemon |/pokemon-shape/{id or name}/ |GET |Get-PokePokemonShape | +|pokemon |/pokemon-species/ |GET |Get-PokePokemonSpecies | +|pokemon |/pokemon-species/{id or name}/ |GET |Get-PokePokemonSpecies | +|pokemon |/stat/ |GET |Get-PokePokemonStat | +|pokemon |/stat/{id or name}/ |GET |Get-PokePokemonStat | +|pokemon |/type/ |GET |Get-PokePokemonType | +|pokemon |/type/{id or name}/ |GET |Get-PokePokemonType | +|utility |/language/ |GET |Get-PokeLanguage | +|utility |/language/{id or name}/ |GET |Get-PokeLanguage | +|utility |/ |GET |Get-PokeEndpoint | + +Each `Get-Poke*` function will respond with the raw data that Poke's API provides. + +

(back to top)

+ +## Roadmap + +- [ ] Add Changelog +- [x] Build more robust Pester & ScriptAnalyzer tests +- [x] Figure out how to do CI & PowerShell gallery automation +- [ ] Add example scripts & automation + +See the [open issues](https://github.com/Celerium/PokeAPI-PowerShellWrapper/issues) for a full list of proposed features (and known issues). + +

(back to top)

+ +--- + +## Contributing + +Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. + +If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". +Don't forget to give the project a star! Thanks again! + +See the [CONTRIBUTING](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) guide for more information about contributing. + +

(back to top)

+ +## License + +Distributed under the MIT License. See [`LICENSE`](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/LICENSE) for more information. + +[![GitHub_License][GitHub_License-shield]][GitHub_License-url] + +

(back to top)

+ +## Contact + +
+ +

+ · + Website + · + Email + · + Reddit + · +

+
+ +

(back to top)

+ +## Acknowledgments + +Big thank you to the following people and services as they have provided me with lots of helpful information as I continue this project! + +- [GitHub Pages](https://pages.github.com) +- [Img Shields](https://shields.io) +- [Font Awesome](https://fontawesome.com) +- [Choose an Open Source License](https://choosealicense.com) +- [GitHub Emoji Cheat Sheet](https://www.webpagefx.com/tools/emoji-cheat-sheet) + +

(back to top)

+ + + + +[Az_Pipeline-shield]: https://img.shields.io/azure-devops/build/AzCelerium/PokeAPI/4?style=for-the-badge&label=DevOps_Build +[Az_Pipeline-url]: https://dev.azure.com/AzCelerium/PokeAPI/_build?definitionId=4 + +[GitHub_Pages-shield]: https://img.shields.io/github/actions/workflow/status/celerium/PokeAPI-PowerShellWrapper/pages%2Fpages-build-deployment?style=for-the-badge&label=GitHub%20Pages +[GitHub_Pages-url]: https://github.com/Celerium/PokeAPI-PowerShellWrapper/actions/workflows/pages/pages-build-deployment + +[GitHub_License-shield]: https://img.shields.io/github/license/celerium/PokeAPI-PowerShellWrapper?style=for-the-badge +[GitHub_License-url]: https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/LICENSE + +[PoshGallery_Version-shield]: https://img.shields.io/powershellgallery/v/PokeAPI?include_prereleases&style=for-the-badge +[PoshGallery_Version-url]: https://www.powershellgallery.com/packages/PokeAPI + +[PoshGallery_Platforms-shield]: https://img.shields.io/powershellgallery/p/PokeAPI?style=for-the-badge +[PoshGallery_Platforms-url]: https://www.powershellgallery.com/packages/PokeAPI + +[PoshGallery_Downloads-shield]: https://img.shields.io/powershellgallery/dt/PokeAPI?style=for-the-badge +[PoshGallery_Downloads-url]: https://www.powershellgallery.com/packages/PokeAPI + +[website-shield]: https://img.shields.io/website?up_color=blue&url=https%3A%2F%2Fcelerium.org&style=for-the-badge&label=Blog +[website-url]: https://celerium.org + +[codeSize-shield]: https://img.shields.io/github/repo-size/celerium/PokeAPI-PowerShellWrapper?style=for-the-badge +[codeSize-url]: https://github.com/Celerium/PokeAPI-PowerShellWrapper + +[contributors-shield]: https://img.shields.io/github/contributors/celerium/PokeAPI-PowerShellWrapper?style=for-the-badge +[contributors-url]: https://github.com/Celerium/PokeAPI-PowerShellWrapper/graphs/contributors + +[forks-shield]: https://img.shields.io/github/forks/celerium/PokeAPI-PowerShellWrapper?style=for-the-badge +[forks-url]: https://github.com/Celerium/PokeAPI-PowerShellWrapper/network/members + +[stars-shield]: https://img.shields.io/github/stars/celerium/PokeAPI-PowerShellWrapper?style=for-the-badge +[stars-url]: https://github.com/Celerium/PokeAPI-PowerShellWrapper/stargazers + +[issues-shield]: https://img.shields.io/github/issues/Celerium/PokeAPI-PowerShellWrapper?style=for-the-badge +[issues-url]: https://github.com/Celerium/PokeAPI-PowerShellWrapper/issues diff --git a/build/Install-Prerequisites.ps1 b/build/Install-Prerequisites.ps1 new file mode 100644 index 0000000..6277859 --- /dev/null +++ b/build/Install-Prerequisites.ps1 @@ -0,0 +1,159 @@ +<# +.NOTES + Copyright 1990-2024 Celerium + + NAME: Install-Prerequisites.ps1 + Type: PowerShell + + AUTHOR: David Schulte + DATE: 2023-04-1 + EMAIL: celerium@Celerium.org + Updated: 2023-09-16 + + TODO: + +.SYNOPSIS + Installs the prerequisites needed to build and test a Celerium PowerShell project. + +.DESCRIPTION + The Install-Prerequisites script installs the prerequisites needed to + build and test a Celerium PowerShell project. + + The various prerequisites required allow for the automation of documentation, + Azure Pipelines, Pester testing, GitHub repo setup, PowerShell module setup + and much more. + +.PARAMETER Modules + Defines one or more modules to install + +.PARAMETER Update + Update the modules if they are already installed + +.PARAMETER Force + Force install and or update modules + +.EXAMPLE + .\Install-Prerequisites.ps1 + + Installs the prerequisites needed to build and test a Celerium PowerShell project. + + No progress information is sent to the console while the script is running. + +.INPUTS + Modules[String] + +.OUTPUTS + N\A + +.LINK + https://celerium.org + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 + +#Region [ Parameters ] + +[CmdletBinding(DefaultParameterSetName = 'Install', SupportsShouldProcess = $true)] + param( + [Parameter(Mandatory=$false, ParameterSetName = 'Install', ValueFromPipeline = $true)] + [ValidateNotNullOrEmpty()] + [String[]]$Modules = @('ModuleBuilder', 'Pester', 'platyPS', 'PSScriptAnalyzer'), + + [Parameter(Mandatory=$false, ParameterSetName = 'Update')] + [Switch]$Force_Update + ) + +#EndRegion [ Parameters ] + +Write-Verbose '' +Write-Verbose "START - $(Get-Date -Format yyyy-MM-dd-HH:mm) - [ $($PSCmdlet.ParameterSetName) ]" +Write-Verbose '' + +#Region [ Prerequisites ] + +$StartDate = Get-Date + +#EndRegion [ Prerequisites ] + +Write-Verbose " - (1/2) - $(Get-Date -Format MM-dd-HH:mm) - Checking Package Provider" + +#Region [ Modules & Providers ] + +try { + + $packageProvider = Get-PackageProvider | Where-Object {$_.Name -eq 'NuGet'} + + If ( $null -eq $packageProvider ){ + throw 'The NuGet prerequisites are not installed, update NuGet then close & reopen PowerShell' + } + +} +Catch{ + Write-Error $_ + exit 1 +} + +#EndRegion [ Modules & Providers ] + +Write-Verbose " - (2/2) - $(Get-Date -Format MM-dd-HH:mm) - Installing Modules" + +#Region [ Main Code ] + +$valid_Modules = [System.Collections.Generic.List[object]]::new() + foreach ($module in $modules) { + + $found_Module = Find-Module -Name $Module -ErrorAction SilentlyContinue + if ($found_Module){ + $valid_Modules.Add($found_Module) > $null + } + else{ Write-Warning " - - $(Get-Date -Format MM-dd-HH:mm) - [ $Module ] is not valid or was not found" } + + } + +if ($valid_Modules) { + + foreach ($module in $valid_Modules) { + + if ( [bool](Get-InstalledModule -Name $module.Name -ErrorAction SilentlyContinue) -eq $false ){ + + Write-Verbose " - - $(Get-Date -Format MM-dd-HH:mm) - Installing [ $($module.Name) | $($module.Version) ]" + Install-Module -Name $module.Name -Force + + } + else{ + + if ($Force_Update){ + + $Version = (Find-Module -Name $module.Name).Version + Write-Verbose " - - $(Get-Date -Format MM-dd-HH:mm) - Updating [ $($module.Name)| [ $($module.Version) --> $Version ] ]" + + Update-Module -Name $module.Name -Force + + } + else { + Write-Verbose " - - $(Get-Date -Format MM-dd-HH:mm) - Already installed [ $($module.Name) | $($module.Version) ]" + } + + } + + } + +} +else{ + Write-Error " - - $(Get-Date -Format MM-dd-HH:mm) - No valid modules found at this time" + exit 1 +} + +#EndRegion [ Main Code ] + +Write-Verbose '' +Write-Verbose "END - $(Get-Date -Format yyyy-MM-dd-HH:mm)" +Write-Verbose '' + +$TimeToComplete = New-TimeSpan -Start $StartDate -End (Get-Date) +Write-Verbose 'Time to complete' +Write-Verbose ($TimeToComplete | Select-Object * -ExcludeProperty Ticks,Total*,Milli* | Out-String) \ No newline at end of file diff --git a/build/Invoke-helpContent.ps1 b/build/Invoke-helpContent.ps1 new file mode 100644 index 0000000..30200a9 --- /dev/null +++ b/build/Invoke-helpContent.ps1 @@ -0,0 +1,118 @@ +<# +.NOTES + Copyright 1990-2024 Celerium + + NAME: Invoke-helpContent.ps1 + Type: PowerShell + + AUTHOR: David Schulte + DATE: 2022-11-26 + EMAIL: celerium@celerium.org + Updated: 2023-09-16 + + TODO: + +.SYNOPSIS + Calls the Update-helpContent function to update module markdown help files + +.DESCRIPTION + The Invoke-helpContent script calls the Update-helpContent function to + update module markdown help files + +.PARAMETER moduleName + The name of the module to update help docs for + +.PARAMETER githubPageUri + The github project url to inject into help docs + +.EXAMPLE + .\Invoke-helpContent.ps1 + -moduleName PokeAPI + -helpDocsPath "C:\Celerium\Projects\PokeAPI-PowerShellWrapper\docs" + -csvFilePath "C:\Celerium\Projects\PokeAPI-PowerShellWrapper\docs\Endpoints.csv" + -githubPageUri "https://celerium.github.io/PokeAPI-PowerShellWrapper" + + Updates markdown docs and external help files + + No progress information is sent to the console while the script is running. + +.INPUTS + N\A + +.OUTPUTS + N\A + +.LINK + https://celerium.org + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName="platyPS"; ModuleVersion="0.14.2" } + +#Region [ Parameters ] + +[CmdletBinding(SupportsShouldProcess = $true)] + param ( + [Parameter(Mandatory=$false)] + [ValidateNotNullOrEmpty()] + [String]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$false)] + [ValidateNotNullOrEmpty()] + [String]$githubPageUri = "https://celerium.github.io/PokeAPI-PowerShellWrapper" + ) + +#EndRegion [ Parameters ] + +Write-Verbose '' +Write-Verbose "START - $(Get-Date -Format yyyy-MM-dd-HH:mm) - [ $($PSCmdlet.ParameterSetName) ]" +Write-Verbose '' + +#Region [ Prerequisites ] + +$StartDate = Get-Date + +#EndRegion [ Prerequisites ] + +#Region [ Update Help ] + +try { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\build', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/build', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + Import-Module $( Join-Path -Path $rootPath -ChildPath 'build\Update-helpContent.ps1' ) -Force -Verbose:$false + + $parameters = @{ + moduleName = $moduleName + helpDocsPath = Join-Path -Path $rootPath -ChildPath 'docs' + csvFilePath = Join-Path -Path $rootPath -ChildPath 'docs\Endpoints.csv' + githubPageUri = $githubPageUri + verbose = $true + } + + Update-helpContent @parameters + +} +catch { + Write-Error $_ + exit 1 +} + +#EndRegion [ Update Help ] + +Write-Verbose '' +Write-Verbose "END - $(Get-Date -Format yyyy-MM-dd-HH:mm)" +Write-Verbose '' + +$TimeToComplete = New-TimeSpan -Start $StartDate -End (Get-Date) +Write-Verbose 'Time to complete' +Write-Verbose ($TimeToComplete | Select-Object * -ExcludeProperty Ticks,Total*,Milli* | Out-String) \ No newline at end of file diff --git a/build/Invoke-moduleBuild.ps1 b/build/Invoke-moduleBuild.ps1 new file mode 100644 index 0000000..fee7928 --- /dev/null +++ b/build/Invoke-moduleBuild.ps1 @@ -0,0 +1,131 @@ +<# +.NOTES + Copyright 1990-2024 Celerium + + NAME: Invoke-moduleBuild.ps1 + Type: PowerShell + + AUTHOR: David Schulte + DATE: 2023-04-1 + EMAIL: celerium@Celerium.org + Updated: 2023-09-16 + + TODO: + +.SYNOPSIS + Builds & prepares a PowerShell module for deployment + +.DESCRIPTION + The Invoke-moduleBuild.ps1 script builds & prepares a PowerShell + module for deployment + +.PARAMETER moduleName + The name of the module to build + + Example: PokeAPI + +.PARAMETER Version + The module version (must be a valid System.Version such as PowerShell supports for modules) + +.PARAMETER UnversionedOutputDirectory + Overrides the VersionedOutputDirectory, producing an OutputDirectory without a version number as the last folder + +.EXAMPLE + .\Invoke-moduleBuild.ps1 -Version 1.2.3 + + Compiles the module files located in ..\moduleName and builds + a combined module in ...\build\moduleName\1.2.3 + +.INPUTS + N\A + +.OUTPUTS + N\A + +.LINK + https://celerium.org + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName="ModuleBuilder"; ModuleVersion="3.0.1" } +#Requires -Modules @{ ModuleName="Pester"; ModuleVersion="5.5.0" } +#Requires -Modules @{ ModuleName="platyPS"; ModuleVersion="0.14.2" } + +#Region [ Parameters ] + +[CmdletBinding(SupportsShouldProcess = $true)] + param ( + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [string]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$Version, + + [Parameter(Mandatory=$false)] + [Switch]$UnversionedOutputDirectory + ) + +#EndRegion [ Parameters ] + +Write-Verbose '' +Write-Verbose "START - $(Get-Date -Format yyyy-MM-dd-HH:mm) - [ $($PSCmdlet.ParameterSetName) ]" +Write-Verbose '' + +#Region [ Prerequisites ] + +$StartDate = Get-Date + +#EndRegion [ Prerequisites ] + +#Region [ Build Module ] + +try { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\build', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/build', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + $modulePath = Join-Path -Path $rootPath -ChildPath $moduleName + $SourcePath = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + $OutputDirectory = Join-Path -Path $rootPath -ChildPath "build" + + $params = @{ + SourcePath = $SourcePath + OutputDirectory = $OutputDirectory + Version = $Version + PublicFilter = Join-Path -Path 'Private','Public' -ChildPath "*.ps1" + UnversionedOutputDirectory = $UnversionedOutputDirectory + } + + Build-Module @params -Verbose + + #Replace & comment out NestedModules from nonBuilt module + $modulePath_Built = Join-Path -Path $OutputDirectory -ChildPath "$moduleName\$Version\$moduleName.psd1" + + Update-Metadata -Path $modulePath_Built -PropertyName NestedModules -Value @() + (Get-Content -Path $modulePath_Built -Raw) -replace 'NestedModules = @\(\)', '# NestedModules = @()' | Set-Content -Path $modulePath_Built + +} +catch { + Write-Error $_ + exit 1 +} + +#EndRegion [ Build Module ] + +Write-Verbose '' +Write-Verbose "END - $(Get-Date -Format yyyy-MM-dd-HH:mm)" +Write-Verbose '' + +$TimeToComplete = New-TimeSpan -Start $StartDate -End (Get-Date) +Write-Verbose 'Time to complete' +Write-Verbose ($TimeToComplete | Select-Object * -ExcludeProperty Ticks,Total*,Milli* | Out-String) \ No newline at end of file diff --git a/build/Invoke-pesterTests.ps1 b/build/Invoke-pesterTests.ps1 new file mode 100644 index 0000000..5fd3ab1 --- /dev/null +++ b/build/Invoke-pesterTests.ps1 @@ -0,0 +1,181 @@ +<# +.NOTES + Copyright 1990-2024 Celerium + + NAME: Invoke-pesterTests.ps1 + Type: PowerShell + + AUTHOR: David Schulte + DATE: 2023-04-1 + EMAIL: celerium@Celerium.org + Updated: 2023-09-16 + + TODO: + Add public function testing with secrets + +.SYNOPSIS + Invoke Pester tests against all functions in a module + +.DESCRIPTION + Invoke Pester tests against all functions in a module + +.PARAMETER moduleName + The name of the local module to import + + Default value: PokeAPI + +.PARAMETER Version + The version of the local module to import + +.PARAMETER IncludeTag + Tags to run tests against + +.PARAMETER ExcludeTag + Tags associated to test to skip + +.PARAMETER buildTarget + Which version of the module to run tests against + + Allowed values: + 'built', 'notBuilt' + +.PARAMETER Output + How detailed should the pester output be + + Default value: Normal + + Allowed values: + 'Detailed', 'Diagnostic', 'Minimal', 'None', 'Normal' + + +.EXAMPLE + .\Invoke-pesterTests -moduleName PokeAPI -Version 1.2.3 + + Runs various pester tests against all functions in the module + and outputs the results to the console. + + An XML of the tests is also output to the build directory + +.INPUTS + N\A + +.OUTPUTS + N\A + +.LINK + https://celerium.org + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.5.0' } + +#Region [ Parameters ] + +[CmdletBinding()] +param ( + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [string]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$version, + + [Parameter(Mandatory=$false)] + [string[]]$IncludeTag = @(), + + [Parameter(Mandatory=$false)] + [string[]]$ExcludeTag = 'PLACEHOLDER', + + [Parameter(Mandatory=$false)] + [ValidateSet('built','notBuilt')] + [string]$buildTarget = 'notBuilt', + + [Parameter(Mandatory=$false)] + [ValidateSet('Detailed', 'Diagnostic', 'Minimal', 'None', 'Normal')] + [string]$output = 'Normal' +) + +#EndRegion [ Parameters ] + +#Region [ Prerequisites ] + +try { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\build', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/build', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + switch ($buildTarget){ + 'built' { $modulePath = Join-Path -Path $rootPath -ChildPath "\build\$moduleName\$version" } + 'notBuilt' { $modulePath = Join-Path -Path $rootPath -ChildPath "$moduleName" } + } + + $testPath = Join-Path -Path $rootPath -ChildPath "tests" + + #$withoutAuth = $( [bool]$Api_Key_Public -eq $false -or [bool]$Api_Key_Secret -eq $false ) + +} +catch { + Write-Error $_ + exit 1 +} + +#EndRegion [ Prerequisites ] + +#Region [ Pester Configuration ] + +$pesterContainer_params = @{ + 'moduleName' = $moduleName; + 'version' = $Version; + 'buildTarget' = $buildTarget +} + $pester_Container = New-PesterContainer -Path $testPath -Data $pesterContainer_params + +$pester_Options = @{ + + Run = @{ + Container = $pester_Container + PassThru = $true + } + + Filter = @{ + Tag = $IncludeTag + ExcludeTag = $ExcludeTag + } + + TestResult = @{ + Enabled = $true + OutputFormat = 'NUnitXml' + OutputPath = Join-Path -Path . -ChildPath "build\$($moduleName)_$($buildTarget)_Results.xml" + OutputEncoding = 'UTF8' + } + + Should = @{ + ErrorAction = 'Continue' + } + + Output = @{ + Verbosity = $output + } + +} + + $pester_Configuration = New-PesterConfiguration -Hashtable $pester_Options + +#EndRegion [ Pester Configuration ] + +#Region [ Pester Invoke ] + +$pester_Results = Invoke-Pester -Configuration $pester_Configuration + Set-Variable -Name Invoke_PesterResults -Value $pester_Results -Scope Global -Force + +#EndRegion [ Pester Invoke ] + diff --git a/build/PokeAPI/1.0.0/PokeAPI.psd1 b/build/PokeAPI/1.0.0/PokeAPI.psd1 new file mode 100644 index 0000000..d680d14 --- /dev/null +++ b/build/PokeAPI/1.0.0/PokeAPI.psd1 @@ -0,0 +1,136 @@ +# +# Module manifest for module 'PokeAPI' +# +# Generated by: David Schulte +# +# Generated on: 2024-02-24 +# + +@{ + + # Script module or binary module file associated with this manifest + RootModule = 'PokeAPI.psm1' + + # Version number of this module. + # Follows https://semver.org Semantic Versioning 2.0.0 + # Given a version number MAJOR.MINOR.PATCH, increment the: + # -- MAJOR version when you make incompatible API changes, + # -- MINOR version when you add functionality in a backwards-compatible manner, and + # -- PATCH version when you make backwards-compatible bug fixes. + + # Version number of this module. + ModuleVersion = '1.0.0' + + # Supported PSEditions + # CompatiblePSEditions = @() + + # ID used to uniquely identify this module + GUID = 'd6c6b73e-d0ad-4d09-8a24-a5a05064d26c' + + # Author of this module + Author = 'David Schulte' + + # Company or vendor of this module + CompanyName = 'Celerium' + + # Copyright information of this module + Copyright = 'https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/LICENSE' + + # Description of the functionality provided by this module + Description = 'This module provides a PowerShell wrapper for PokeAPI' + + # Minimum version of the Windows PowerShell engine required by this module + PowerShellVersion = '5.1' + + # Name of the Windows PowerShell host required by this module + # PowerShellHostName = '' + + # Minimum version of the Windows PowerShell host required by this module + # PowerShellHostVersion = '' + + # Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only. + # DotNetFrameworkVersion = '' + + # Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only. + # CLRVersion = '' + + # Processor architecture (None, X86, Amd64) required by this module + # ProcessorArchitecture = '' + + # Modules that must be imported into the global environment prior to importing this module + # RequiredModules = @( ) + + # Assemblies that must be loaded prior to importing this module + # RequiredAssemblies = @() + + # Script files (.ps1) that are run in the caller's environment prior to importing this module. + #ScriptsToProcess = @() + + # Type files (.ps1xml) to be loaded when importing this module + # TypesToProcess = @() + + # Format files (.ps1xml) to be loaded when importing this module + # FormatsToProcess = @() + + # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess + # NestedModules = @() + + # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. + FunctionsToExport = @('ConvertTo-PokeQueryString','Get-PokeMetaData','Invoke-PokeRequest','Add-PokeBaseURI','Get-PokeBaseURI','Remove-PokeBaseURI','Export-PokeModuleSettings','Get-PokeModuleSettings','Import-PokeModuleSettings','Initialize-PokeModuleSettings','Remove-PokeModuleSettings','Get-PokeBerry','Get-PokeBerryFirmness','Get-PokeBerryFlavor','Get-PokeContestEffect','Get-PokeContestSuperEffect','Get-PokeContestType','Get-PokeEncounterCondition','Get-PokeEncounterConditionValue','Get-PokeEncounterMethod','Get-PokeEvolutionChain','Get-PokeEvolutionTrigger','Get-PokeGameGeneration','Get-PokeGamePokedex','Get-PokeGameVersion','Get-PokeGameVersionGroup','Get-PokeItem','Get-PokeItemAttribute','Get-PokeItemCategory','Get-PokeItemFlingEffect','Get-PokeItemPocket','Get-PokeLocation','Get-PokeLocationArea','Get-PokeLocationPalParkArea','Get-PokeLocationRegion','Get-PokeMachine','Get-PokeMove','Get-PokeMoveAilment','Get-PokeMoveBattleStyle','Get-PokeMoveCategory','Get-PokeMoveDamageClass','Get-PokeMoveLearnMethod','Get-PokeMoveTarget','Get-PokePokemon','Get-PokePokemonAbility','Get-PokePokemonCharacteristic','Get-PokePokemonColor','Get-PokePokemonEggGroup','Get-PokePokemonEncounter','Get-PokePokemonForm','Get-PokePokemonGender','Get-PokePokemonGrowthRate','Get-PokePokemonHabitat','Get-PokePokemonNature','Get-PokePokemonPokeathlonStat','Get-PokePokemonShape','Get-PokePokemonSpecies','Get-PokePokemonStat','Get-PokePokemonType','Get-PokeEndpoint','Get-PokeLanguage') + + # Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export. + CmdletsToExport = @() + + # Variables to export from this module + VariablesToExport = '*' + + # Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export. + AliasesToExport = 'Set-PokeBaseURI' + + # DSC resources to export from this module + # DscResourcesToExport = @() + + # List of all modules packaged with this module + # ModuleList = @() + + # List of all files packaged with this module + # FileList = @() + + # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell. + PrivateData = @{ + + PSData = @{ + + # Tags applied to this module. These help with module discovery in online galleries. + Tags = @('PokeAPI', 'Pokemon', 'API', 'PowerShell', 'PSEdition_Desktop', 'PSEdition_Core', 'Celerium') + + # A URL to the license for this module. + LicenseUri = 'https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/LICENSE' + + # A URL to the main website for this project. + ProjectUri = 'https://github.com/Celerium/PokeAPI-PowerShellWrapper' + + # A URL to an icon representing this module. + IconUri = 'https://raw.githubusercontent.com/Celerium/PokeAPI-PowerShellWrapper/main/.github/images/Celerium_PoSHGallery_PokeAPI.png' + + # ReleaseNotes of this module + ReleaseNotes = 'https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/README.md' + + # Identifies the module as a prerelease version in online galleries. + #PreRelease = '-BETA' + + # Indicate whether the module requires explicit user acceptance for install, update, or save. + RequireLicenseAcceptance = $false + + } # End of PSData hashtable + + } # End of PrivateData hashtable + + # HelpInfo URI of this module + # HelpInfoURI = 'https://github.com/Celerium/PokeAPI-PowerShellWrapper' + + # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix. + # DefaultCommandPrefix = '' + +} + diff --git a/build/PokeAPI/1.0.0/PokeAPI.psm1 b/build/PokeAPI/1.0.0/PokeAPI.psm1 new file mode 100644 index 0000000..2fa5762 --- /dev/null +++ b/build/PokeAPI/1.0.0/PokeAPI.psm1 @@ -0,0 +1,6166 @@ +#Region '.\Private\apiCalls\ConvertTo-PokeQueryString.ps1' 0 +function ConvertTo-PokeQueryString { +<# + .SYNOPSIS + Converts uri filter parameters + + .DESCRIPTION + The Invoke-PokeRequest cmdlet converts & formats uri filter parameters + from a function which are later used to make the full resource uri for + an API call + + This is an internal helper function the ties in directly with the + Invoke-PokeRequest & any public functions that define parameters + + .PARAMETER uri_Filter + Hashtable of values to combine a functions parameters with + the resource_Uri parameter. + + This allows for the full uri query to occur + + .PARAMETER resource_Uri + Defines the short resource uri (url) to use when creating the API call + + .EXAMPLE + ConvertTo-PokeQueryString -uri_Filter $uri_Filter -resource_Uri '/account' + + Example: (From public function) + $uri_Filter = @{} + + ForEach ( $Key in $PSBoundParameters.GetEnumerator() ){ + if( $excludedParameters -contains $Key.Key ){$null} + else{ $uri_Filter += @{ $Key.Key = $Key.Value } } + } + + 1x key = https://pokeapi.co/api/v2/account?accountId=12345 + 2x key = https://pokeapi.co/api/v2/account?accountId=12345&details=True + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/ConvertTo-PokeQueryString.html + +#> + +[CmdletBinding()] +param( + [Parameter(Mandatory = $true, ValueFromPipeline = $true)] + [hashtable]$uri_Filter, + + [Parameter(Mandatory = $true)] + [String]$resource_Uri +) + + begin {} + + process { + + if (-not $uri_Filter) { + return "" + } + + $excludedParameters = 'Debug', 'ErrorAction', 'ErrorVariable', 'InformationAction', 'InformationVariable', + 'OutBuffer', 'OutVariable', 'PipelineVariable', 'Verbose', 'WarningAction', 'WarningVariable', + 'allPages', 'id', 'name' + + $query_Parameters = [System.Web.HttpUtility]::ParseQueryString([String]::Empty) + + ForEach ( $Key in $uri_Filter.GetEnumerator() ){ + + if( $excludedParameters -contains $Key.Key ){$null} + elseif ( $Key.Value.GetType().IsArray ){ + Write-Verbose "[ $($Key.Key) ] is an array parameter" + foreach ($Value in $Key.Value) { + #$ParameterName = $Key.Key + $query_Parameters.Add($Key.Key, $Value) + } + } + else{ + $query_Parameters.Add($Key.Key, $Key.Value) + } + + } + + # Build the request and load it with the query string. + $uri_Request = [System.UriBuilder]($Poke_Base_URI + $resource_Uri) + $uri_Request.Query = $query_Parameters.ToString() + + return $uri_Request + + } + + end {} + +} +#EndRegion '.\Private\apiCalls\ConvertTo-PokeQueryString.ps1' 95 +#Region '.\Private\apiCalls\Get-PokeMetaData.ps1' 0 +function Get-PokeMetaData { +<# + .SYNOPSIS + Gets various Api metadata values + + .DESCRIPTION + The Get-PokeMetaData cmdlet gets various Api metadata values from an + Invoke-WebRequest to assist in various troubleshooting scenarios such + as rate-limiting. + + .PARAMETER base_uri + Define the base URI for the Poke API connection using Poke's URI or a custom URI. + + The default base URI is https://pokeapi.co/api/v2 + + .EXAMPLE + Get-PokeMetaData + + Gets various Api metadata values from an Invoke-WebRequest to assist + in various troubleshooting scenarios such as rate-limiting. + + The default full base uri test path is: + https://pokeapi.co/api/v2 + + .EXAMPLE + Get-PokeMetaData -base_uri http://myapi.gateway.example.com + + Gets various Api metadata values from an Invoke-WebRequest to assist + in various troubleshooting scenarios such as rate-limiting. + + The full base uri test path in this example is: + http://myapi.gateway.example.com/device + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeMetaData.html +#> + + [CmdletBinding()] + Param ( + [parameter(Mandatory = $false, ValueFromPipeline = $true)] + [string]$base_uri = $Poke_Base_URI + ) + + begin { $resource_uri = "/" } + + process { + + try { + + $Poke_Headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]" + $Poke_Headers.Add("Content-Type", 'application/json') + + $rest_output = Invoke-WebRequest -method Get -uri ($base_uri + $resource_uri) -headers $Poke_Headers -ErrorAction Stop + } + catch { + + [PSCustomObject]@{ + Method = $_.Exception.Response.Method + StatusCode = $_.Exception.Response.StatusCode.value__ + StatusDescription = $_.Exception.Response.StatusDescription + Message = $_.Exception.Message + URI = $($Poke_Base_URI + $resource_uri) + } + + } + finally { + Remove-Variable -Name Poke_Headers -Force + } + + Set-Variable -Name Test_rest_output -Value $rest_output -Scope Global -Force + + if ($rest_output){ + $data = @{} + $data = $rest_output + + [PSCustomObject]@{ + ResponseUri = $data.BaseResponse.ResponseUri.AbsoluteUri + ResponsePort = $data.BaseResponse.ResponseUri.Port + StatusCode = $data.StatusCode + StatusDescription = $data.StatusDescription + raw = $data + } + } + + } + + end {} +} +#EndRegion '.\Private\apiCalls\Get-PokeMetaData.ps1' 92 +#Region '.\Private\apiCalls\Invoke-PokeRequest.ps1' 0 +function Invoke-PokeRequest { +<# + .SYNOPSIS + Makes an API request + + .DESCRIPTION + The Invoke-PokeRequest cmdlet invokes an API request to Poke API. + + This is an internal function that is used by all public functions + + As of 2023-08 the Poke v1 API only supports GET requests + + .PARAMETER method + Defines the type of API method to use + + Allowed values: + 'GET', 'PUT' + + .PARAMETER resource_Uri + Defines the resource uri (url) to use when creating the API call + + .PARAMETER uri_Filter + Used with the internal function [ ConvertTo-PokeQueryString ] to combine + a functions parameters with the resource_Uri parameter. + + This allows for the full uri query to occur + + The full resource path is made with the following data + $Poke_Base_URI + $resource_Uri + ConvertTo-PokeQueryString + + .PARAMETER data + Place holder parameter to use when other methods are supported + by the Poke v1 API + + .PARAMETER allPages + Returns all items from an endpoint + + When using this parameter there is no need to use either the page or perPage + parameters + + .EXAMPLE + Invoke-PokeRequest -method GET -resource_Uri '/account' -uri_Filter $uri_Filter + + Invoke a rest method against the defined resource using any of the provided parameters + + Example: + Name Value + ---- ----- + Method GET + Uri https://pokeapi.co/api/v2/account?accountId=12345&details=True + + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Invoke-PokeRequest.html + +#> + + [CmdletBinding()] + param ( + [Parameter(Mandatory = $false)] + [ValidateSet('GET')] + [String]$method = 'GET', + + [Parameter(Mandatory = $true)] + [String]$resource_Uri, + + [Parameter(Mandatory = $false)] + [Hashtable]$uri_Filter = $null, + + [Parameter(Mandatory = $false)] + [Switch]$allPages + + ) + + begin {} + + process { + + # Load Web assembly when needed as PowerShell Core has the assembly preloaded + if ( !("System.Web.HttpUtility" -as [Type]) ) { + Add-Type -Assembly System.Web + } + + $query_string = ConvertTo-PokeQueryString -uri_Filter $uri_Filter -resource_Uri $resource_Uri + + Set-Variable -Name 'PokeAPI_queryString' -Value $query_string -Scope Global -Force + + try { + + $parameters = [ordered] @{ + "Method" = $method + "Uri" = $query_string.Uri + } + + Set-Variable -Name 'PokeAPI_invokeParameters' -Value $parameters -Scope Global -Force + + if ($allPages) { + + Write-Verbose "Gathering all items from [ $( $Poke_Base_URI + $resource_Uri ) ] " + + $page_number = 1 + $all_responseData = [System.Collections.Generic.List[object]]::new() + + do { + + $current_page = Invoke-RestMethod @parameters -ErrorAction Stop + + $total_Count = $current_page.count + $offset = if([bool]$current_page.next){([regex]::match($current_page.next,'(offset=[0-9]+)').Groups[1].Value) -Replace '\D+'}else{$null} + $limit = if([bool]$current_page.next){([regex]::match($current_page.next,'(limit=[0-9]+)').Groups[1].Value) -Replace '\D+'}else{$null} + $total_pages = if([bool]$current_page.next ){[math]::ceiling($($total_Count - $offset)/$limit + $page_number)}else{$null} + + Write-Verbose "[ $page_number ] of [ $total_pages ] pages" + + foreach ($item in $current_page.results) { + $all_responseData.add($item) + } + + $parameters.Remove('Uri') > $null + $parameters.Add('Uri',$current_page.next) + + $page_number++ + + } while ($null -ne $current_page.next) + + } + else{ + $api_response = Invoke-RestMethod @parameters -ErrorAction Stop + } + + } + catch { + + $exceptionError = $_.Exception.Message + Write-Warning 'The [ Poke_invokeParameters, Poke_queryString, & Poke_CmdletNameParameters ] variables can provide extra details' + + switch -Wildcard ($exceptionError) { + '*404*' { Write-Error "Invoke-PokeRequest : [ $resource_Uri ] not found!" } + '*429*' { Write-Error 'Invoke-PokeRequest : API rate limited' } + '*504*' { Write-Error "Invoke-PokeRequest : Gateway Timeout" } + default { Write-Error $_ } + } + + } + finally {} + + + if($allPages) { + + Set-Variable -Name Test_all_responseData -Value $all_responseData -Scope Global -Force + + #Making output consistent + if( [string]::IsNullOrEmpty($all_responseData) ) { + $api_response = $null + } + else{ + $api_response = [PSCustomObject]@{ + count = $total_Count + next = $null + previous = $null + results = $all_responseData + } + } + + return $api_response + + } + else{ return $api_response } + + } + + end {} + +} +#EndRegion '.\Private\apiCalls\Invoke-PokeRequest.ps1' 178 +#Region '.\Private\baseUri\Add-PokeBaseURI.ps1' 0 +function Add-PokeBaseURI { +<# + .SYNOPSIS + Sets the base URI for the Poke API connection. + + .DESCRIPTION + The Add-PokeBaseURI cmdlet sets the base URI which is later used + to construct the full URI for all API calls. + + .PARAMETER base_uri + Define the base URI for the Poke API connection using Poke's URI or a custom URI. + + .EXAMPLE + Add-PokeBaseURI + + The base URI will use https://pokeapi.co/api/v2/ which is Poke's default URI. + + .EXAMPLE + Add-PokeBaseURI -base_uri http://myapi.gateway.example.com + + A custom API gateway of http://myapi.gateway.example.com will be used for all API calls to Poke's API. + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Add-PokeBaseURI.html +#> + + [cmdletbinding()] + Param ( + [Parameter(Mandatory = $false , ValueFromPipeline = $true)] + [string]$base_uri = 'https://pokeapi.co/api/v2' + ) + + begin {} + + process { + + # Trim superfluous forward slash from address (if applicable) + if ($base_uri[$base_uri.Length-1] -eq "/") { + $base_uri = $base_uri.Substring(0,$base_uri.Length-1) + } + + Set-Variable -Name "Poke_Base_URI" -Value $base_uri -Option ReadOnly -Scope global -Force + + } + + end {} + +} + +New-Alias -Name Set-PokeBaseURI -Value Add-PokeBaseURI +#EndRegion '.\Private\baseUri\Add-PokeBaseURI.ps1' 54 +#Region '.\Private\baseUri\Get-PokeBaseURI.ps1' 0 +function Get-PokeBaseURI { +<# + .SYNOPSIS + Shows the Poke base URI global variable. + + .DESCRIPTION + The Get-PokeBaseURI cmdlet shows the Poke base URI global variable value. + + .EXAMPLE + Get-PokeBaseURI + + Shows the Poke base URI global variable value. + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeBaseURI.html +#> + + [cmdletbinding()] + Param () + + begin {} + + process { + + switch ([bool]$Poke_Base_URI) { + $true { $Poke_Base_URI } + $false { Write-Warning "The Poke base URI is not set. Run Add-PokeBaseURI to set the base URI." } + } + + } + + end {} + +} +#EndRegion '.\Private\baseUri\Get-PokeBaseURI.ps1' 38 +#Region '.\Private\baseUri\Remove-PokeBaseURI.ps1' 0 +function Remove-PokeBaseURI { +<# + .SYNOPSIS + Removes the Poke base URI global variable. + + .DESCRIPTION + The Remove-PokeBaseURI cmdlet removes the Poke base URI global variable. + + .EXAMPLE + Remove-PokeBaseURI + + Removes the Poke base URI global variable. + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Remove-PokeBaseURI.html +#> + + [cmdletbinding(SupportsShouldProcess)] + Param () + + begin {} + + process { + + switch ([bool]$Poke_Base_URI) { + $true { Remove-Variable -Name "Poke_Base_URI" -Scope global -Force } + $false { Write-Warning "The Poke base URI variable is not set. Nothing to remove" } + } + + } + + end {} + +} +#EndRegion '.\Private\baseUri\Remove-PokeBaseURI.ps1' 38 +#Region '.\Private\moduleSettings\Export-PokeModuleSettings.ps1' 0 +function Export-PokeModuleSettings { +<# + .SYNOPSIS + Exports the Poke BaseURI, API, & JSON configuration information to file. + + .DESCRIPTION + The Export-PokeModuleSettings cmdlet exports the Poke BaseURI information to file. + + .PARAMETER PokeConfPath + Define the location to store the Poke configuration file. + + By default the configuration file is stored in the following location: + $env:USERPROFILE\PokeAPI + + .PARAMETER PokeConfFile + Define the name of the Poke configuration file. + + By default the configuration file is named: + config.psd1 + + .EXAMPLE + Export-PokeModuleSettings + + Validates that the BaseURI is set then exports their values + to the current user's Poke configuration file located at: + $env:USERPROFILE\PokeAPI\config.psd1 + + .EXAMPLE + Export-PokeModuleSettings -PokeConfPath C:\PokeAPI -PokeConfFile MyConfig.psd1 + + Validates that the BaseURI is set then exports their values + to the current user's Poke configuration file located at: + C:\PokeAPI\MyConfig.psd1 + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Export-PokeModuleSettings.html +#> + + [CmdletBinding(DefaultParameterSetName = 'set')] + Param ( + [Parameter(ParameterSetName = 'set')] + [string]$PokeConfPath = $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ), + + [Parameter(ParameterSetName = 'set')] + [string]$PokeConfFile = 'config.psd1' + ) + + begin {} + + process { + + $PokeConfig = Join-Path -Path $PokeConfPath -ChildPath $PokeConfFile + + # Confirm variables exist and are not null before exporting + if ($Poke_Base_URI) { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + New-Item -Path $PokeConfPath -ItemType Directory -Force | ForEach-Object { $_.Attributes = $_.Attributes -bor "Hidden" } + } + else{ + New-Item -Path $PokeConfPath -ItemType Directory -Force + } +@" + @{ + Poke_Base_URI = '$Poke_Base_URI' + } +"@ | Out-File -FilePath $PokeConfig -Force + } + else { + Write-Error "Failed to export Poke Module settings to [ $PokeConfig ]" + Write-Error $_ + exit 1 + } + + } + + end {} + +} +#EndRegion '.\Private\moduleSettings\Export-PokeModuleSettings.ps1' 83 +#Region '.\Private\moduleSettings\Get-PokeModuleSettings.ps1' 0 +function Get-PokeModuleSettings { +<# + .SYNOPSIS + Gets the saved Poke configuration settings + + .DESCRIPTION + The Get-PokeModuleSettings cmdlet gets the saved Poke configuration settings + from the local system. + + By default the configuration file is stored in the following location: + $env:USERPROFILE\PokeAPI + + .PARAMETER PokeConfPath + Define the location to store the Poke configuration file. + + By default the configuration file is stored in the following location: + $env:USERPROFILE\PokeAPI + + .PARAMETER PokeConfFile + Define the name of the Poke configuration file. + + By default the configuration file is named: + config.psd1 + + .PARAMETER openConfFile + Opens the Poke configuration file + + .EXAMPLE + Get-PokeModuleSettings + + Gets the contents of the configuration file that was created with the + Export-PokeModuleSettings + + The default location of the Poke configuration file is: + $env:USERPROFILE\PokeAPI\config.psd1 + + .EXAMPLE + Get-PokeModuleSettings -PokeConfPath C:\PokeAPI -PokeConfFile MyConfig.psd1 -openConfFile + + Opens the configuration file from the defined location in the default editor + + The location of the Poke configuration file in this example is: + C:\PokeAPI\MyConfig.psd1 + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeModuleSettings.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index')] + Param ( + [Parameter(Mandatory = $false, ParameterSetName = 'index')] + [string]$PokeConfPath = $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ), + + [Parameter(Mandatory = $false, ParameterSetName = 'index')] + [String]$PokeConfFile = 'config.psd1', + + [Parameter(Mandatory = $false, ParameterSetName = 'show')] + [Switch]$openConfFile + ) + + begin { + $PokeConfig = Join-Path -Path $PokeConfPath -ChildPath $PokeConfFile + } + + process { + + if ( Test-Path -Path $PokeConfig ){ + + if($openConfFile){ + Invoke-Item -Path $PokeConfig + } + else{ + Import-LocalizedData -BaseDirectory $PokeConfPath -FileName $PokeConfFile + } + + } + else{ + Write-Verbose "No configuration file found at [ $PokeConfig ]" + } + + } + + end {} + +} +#EndRegion '.\Private\moduleSettings\Get-PokeModuleSettings.ps1' 89 +#Region '.\Private\moduleSettings\Import-PokeModuleSettings.ps1' 0 +function Import-PokeModuleSettings { +<# + .SYNOPSIS + Imports the Poke BaseURI information to the current session. + + .DESCRIPTION + The Import-PokeModuleSettings cmdlet imports the Poke BaseURI stored in the + Poke configuration file to the users current session. + + By default the configuration file is stored in the following location: + $env:USERPROFILE\PokeAPI + + .PARAMETER PokeConfPath + Define the location to store the Poke configuration file. + + By default the configuration file is stored in the following location: + $env:USERPROFILE\PokeAPI + + .PARAMETER PokeConfFile + Define the name of the Poke configuration file. + + By default the configuration file is named: + config.psd1 + + .EXAMPLE + Import-PokeModuleSettings + + Validates that the configuration file created with the Export-PokeModuleSettings cmdlet exists + then imports the stored data into the current users session. + + The default location of the Poke configuration file is: + $env:USERPROFILE\PokeAPI\config.psd1 + + .EXAMPLE + Import-PokeModuleSettings -PokeConfPath C:\PokeAPI -PokeConfFile MyConfig.psd1 + + Validates that the configuration file created with the Export-PokeModuleSettings cmdlet exists + then imports the stored data into the current users session. + + The location of the Poke configuration file in this example is: + C:\PokeAPI\MyConfig.psd1 + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Import-PokeModuleSettings.html +#> + + [CmdletBinding(DefaultParameterSetName = 'set')] + Param ( + [Parameter(ParameterSetName = 'set')] + [string]$PokeConfPath = $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ), + + [Parameter(ParameterSetName = 'set')] + [string]$PokeConfFile = 'config.psd1' + ) + + begin { + $PokeConfig = Join-Path -Path $PokeConfPath -ChildPath $PokeConfFile + } + + process { + + if ( Test-Path $PokeConfig ) { + $tmp_config = Import-LocalizedData -BaseDirectory $PokeConfPath -FileName $PokeConfFile + + # Send to function to strip potentially superfluous slash (/) + Add-PokeBaseURI $tmp_config.Poke_Base_URI + + Write-Verbose "PokeAPI Module configuration loaded successfully from [ $PokeConfig ]" + + # Clean things up + Remove-Variable "tmp_config" + } + else { + Write-Verbose "No configuration file found at [ $PokeConfig ] run Add-PokeAPIKey to get started." + + Add-PokeBaseURI + + Set-Variable -Name "Poke_Base_URI" -Value $(Get-PokeBaseURI) -Option ReadOnly -Scope global -Force + } + + } + + end {} + +} +#EndRegion '.\Private\moduleSettings\Import-PokeModuleSettings.ps1' 89 +#Region '.\Private\moduleSettings\Initialize-PokeModuleSettings.ps1' 0 +#Used to auto load either baseline settings or saved configurations when the module is imported +Import-PokeModuleSettings -Verbose:$false +#EndRegion '.\Private\moduleSettings\Initialize-PokeModuleSettings.ps1' 3 +#Region '.\Private\moduleSettings\Remove-PokeModuleSettings.ps1' 0 +function Remove-PokeModuleSettings { +<# + .SYNOPSIS + Removes the stored Poke configuration folder. + + .DESCRIPTION + The Remove-PokeModuleSettings cmdlet removes the Poke folder and its files. + This cmdlet also has the option to remove sensitive Poke variables as well. + + By default configuration files are stored in the following location and will be removed: + $env:USERPROFILE\PokeAPI + + .PARAMETER PokeConfPath + Define the location of the Poke configuration folder. + + By default the configuration folder is located at: + $env:USERPROFILE\PokeAPI + + .PARAMETER andVariables + Define if sensitive Poke variables should be removed as well. + + By default the variables are not removed. + + .EXAMPLE + Remove-PokeModuleSettings + + Checks to see if the default configuration folder exists and removes it if it does. + + The default location of the Poke configuration folder is: + $env:USERPROFILE\PokeAPI + + .EXAMPLE + Remove-PokeModuleSettings -PokeConfPath C:\PokeAPI -andVariables + + Checks to see if the defined configuration folder exists and removes it if it does. + If sensitive Poke variables exist then they are removed as well. + + The location of the Poke configuration folder in this example is: + C:\PokeAPI + + .NOTES + N\A + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Remove-PokeModuleSettings.html +#> + + [CmdletBinding(SupportsShouldProcess, DefaultParameterSetName = 'set')] + Param ( + [Parameter(ParameterSetName = 'set')] + [string]$PokeConfPath = $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ), + + [Parameter(ParameterSetName = 'set')] + [switch]$andVariables + ) + + begin {} + + process { + + if (Test-Path $PokeConfPath) { + + Remove-Item -Path $PokeConfPath -Recurse -Force -WhatIf:$WhatIfPreference + + If ($andVariables) { + Remove-PokeBaseURI + } + + if (!(Test-Path $PokeConfPath)) { + Write-Output "The PokeAPI configuration folder has been removed successfully from [ $PokeConfPath ]" + } + else { + Write-Error "The PokeAPI configuration folder could not be removed from [ $PokeConfPath ]" + } + + } + else { + Write-Warning "No configuration folder found at [ $PokeConfPath ]" + } + + } + + end {} + +} +#EndRegion '.\Private\moduleSettings\Remove-PokeModuleSettings.ps1' 86 +#Region '.\Public\berry\Get-PokeBerry.ps1' 0 +function Get-PokeBerry { +<# + .SYNOPSIS + Gets berries from PokeAPI + + .DESCRIPTION + The Get-PokeBerry cmdlet gets berries from PokeAPI + + Berries are small fruits that can provide HP and status condition restoration, + stat enhancement, and even damage negation when eaten by Pokemon + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeBerry + + Gets the first 20 berries sorted by id + + .EXAMPLE + Get-PokeBerry -id 1 + + Gets the berry with the defined id + + .EXAMPLE + Get-PokeBerry -name ditto + + Gets the berry with the defined name + + .EXAMPLE + Get-PokeBerry -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerry.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/berry" } + 'index_ById' { $resource_uri = "/berry/$id" } + 'index_ByName' { $resource_uri = ("/berry/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_BerryParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\berry\Get-PokeBerry.ps1' 107 +#Region '.\Public\berry\Get-PokeBerryFirmness.ps1' 0 +function Get-PokeBerryFirmness { +<# + .SYNOPSIS + Gets the firmness of berries from PokeAPI + + .DESCRIPTION + The Get-PokeBerryFirmness cmdlet gets the firmness of + berries from PokeAPI + + Berries can be soft or hard + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeBerryFirmness + + Gets the first 20 berry firmness sorted by id + + .EXAMPLE + Get-PokeBerryFirmness -id 1 + + Gets the berry firmness with the defined id + + .EXAMPLE + Get-PokeBerryFirmness -name ditto + + Gets the berry firmness with the defined name + + .EXAMPLE + Get-PokeBerryFirmness -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerryFirmness.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/berry-firmness" } + 'index_ById' { $resource_uri = "/berry-firmness/$id" } + 'index_ByName' { $resource_uri = ("/berry-firmness/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_BerryFirmnessParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\berry\Get-PokeBerryFirmness.ps1' 107 +#Region '.\Public\berry\Get-PokeBerryFlavor.ps1' 0 +function Get-PokeBerryFlavor { +<# + .SYNOPSIS + Gets berry flavor from PokeAPI + + .DESCRIPTION + The Get-PokeBerryFlavor cmdlet gets berry flavor from PokeAPI + + Flavors determine whether a Pokemon will benefit or suffer + from eating a berry based on their nature + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeBerryFlavor + + Gets the first 20 berry flavors sorted by id + + .EXAMPLE + Get-PokeBerryFlavor -id 1 + + Gets the berry flavor with the defined id + + .EXAMPLE + Get-PokeBerryFlavor -name ditto + + Gets the berry flavor with the defined name + + .EXAMPLE + Get-PokeBerryFlavor -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerryFlavor.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/berry-flavor" } + 'index_ById' { $resource_uri = "/berry-flavor/$id" } + 'index_ByName' { $resource_uri = ("/berry-flavor/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_BerryFlavorParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\berry\Get-PokeBerryFlavor.ps1' 107 +#Region '.\Public\contest\Get-PokeContestEffect.ps1' 0 +function Get-PokeContestEffect { +<# + .SYNOPSIS + Gets contest effects from PokeAPI + + .DESCRIPTION + The Get-PokeContestEffect cmdlet gets contest effects from PokeAPI + + Contest effects refer to the effects of moves when used in contests + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeContestEffect + + Gets the first 20 contest effects sorted by id + + .EXAMPLE + Get-PokeContestEffect -id 1 + + Gets the contest effect with the defined id + + .EXAMPLE + Get-PokeContestEffect -name ditto + + Gets the contest effect with the defined name + + .EXAMPLE + Get-PokeContestEffect -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestEffect.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/contest-effect" } + 'index_ById' { $resource_uri = "/contest-effect/$id" } + 'index_ByName' { $resource_uri = ("/contest-effect/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_ContestEffectParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\contest\Get-PokeContestEffect.ps1' 106 +#Region '.\Public\contest\Get-PokeContestSuperEffect.ps1' 0 +function Get-PokeContestSuperEffect { +<# + .SYNOPSIS + Gets super contest effects from PokeAPI + + .DESCRIPTION + The Get-PokeContestSuperEffect cmdlet gets super contest effects + from PokeAPI + + Super contest effects refer to the effects of moves when + used in super contests + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeContestSuperEffect + + Gets the first 20 super contest effects sorted by id + + .EXAMPLE + Get-PokeContestSuperEffect -id 1 + + Gets the super contest effect with the defined id + + .EXAMPLE + Get-PokeContestSuperEffect -name ditto + + Gets the super contest effect with the defined name + + .EXAMPLE + Get-PokeContestSuperEffect -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestSuperEffect.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/super-contest-effect" } + 'index_ById' { $resource_uri = "/super-contest-effect/$id" } + 'index_ByName' { $resource_uri = ("/super-contest-effect/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_ContestSuperEffectParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\contest\Get-PokeContestSuperEffect.ps1' 108 +#Region '.\Public\contest\Get-PokeContestType.ps1' 0 +function Get-PokeContestType { +<# + .SYNOPSIS + Gets contest types from PokeAPI + + .DESCRIPTION + The Get-PokeContestType cmdlet gets contest types from PokeAPI + + Contest types are categories judges used to weigh a + Pokemon's condition in Pokemon contests. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeContestType + + Gets the first 20 contest types sorted by id + + .EXAMPLE + Get-PokeContestType -id 1 + + Gets the contest type with the defined id + + .EXAMPLE + Get-PokeContestType -name ditto + + Gets the contest type with the defined name + + .EXAMPLE + Get-PokeContestType -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestType.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/contest-type" } + 'index_ById' { $resource_uri = "/contest-type/$id" } + 'index_ByName' { $resource_uri = ("/contest-type/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_ContestTypeParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\contest\Get-PokeContestType.ps1' 107 +#Region '.\Public\encounter\Get-PokeEncounterCondition.ps1' 0 +function Get-PokeEncounterCondition { +<# + .SYNOPSIS + Gets encounter conditions from PokeAPI + + .DESCRIPTION + The Get-PokeEncounterCondition cmdlet gets encounter conditions from PokeAPI + + Conditions which affect what pokemon might appear in the + wild, e.g., day or night. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeEncounterCondition + + Gets the first 20 encounter conditions sorted by id + + .EXAMPLE + Get-PokeEncounterCondition -id 1 + + Gets the encounter condition with the defined id + + .EXAMPLE + Get-PokeEncounterCondition -name ditto + + Gets the encounter condition with the defined name + + .EXAMPLE + Get-PokeEncounterCondition -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterCondition.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/encounter-condition" } + 'index_ById' { $resource_uri = "/encounter-condition/$id" } + 'index_ByName' { $resource_uri = ("/encounter-condition/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_EncounterConditionParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\encounter\Get-PokeEncounterCondition.ps1' 107 +#Region '.\Public\encounter\Get-PokeEncounterConditionValue.ps1' 0 +function Get-PokeEncounterConditionValue { +<# + .SYNOPSIS + Gets encounter condition values from PokeAPI + + .DESCRIPTION + The Get-PokeEncounterConditionValue cmdlet gets encounter condition values + from PokeAPI + + Encounter condition values are the various states that an encounter + condition can have, i.e., time of day can be either day or night. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeEncounterConditionValue + + Gets the first 20 encounter condition values sorted by id + + .EXAMPLE + Get-PokeEncounterConditionValue -id 1 + + Gets the encounter condition value with the defined id + + .EXAMPLE + Get-PokeEncounterConditionValue -name ditto + + Gets the encounter condition value with the defined name + + .EXAMPLE + Get-PokeEncounterConditionValue -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterConditionValue.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/encounter-condition-value" } + 'index_ById' { $resource_uri = "/encounter-condition-value/$id" } + 'index_ByName' { $resource_uri = ("/encounter-condition-value/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_EncounterConditionValueParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\encounter\Get-PokeEncounterConditionValue.ps1' 108 +#Region '.\Public\encounter\Get-PokeEncounterMethod.ps1' 0 +function Get-PokeEncounterMethod { +<# + .SYNOPSIS + Gets encounter methods from PokeAPI + + .DESCRIPTION + The Get-PokeEncounterMethod cmdlet gets encounter methods from PokeAPI + + Methods by which the player might can encounter Pokemon in the wild, + e.g., walking in tall grass + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeEncounterMethod + + Gets the first 20 encounter methods sorted by id + + .EXAMPLE + Get-PokeEncounterMethod -id 1 + + Gets the encounter method with the defined id + + .EXAMPLE + Get-PokeEncounterMethod -name ditto + + Gets the encounter method with the defined name + + .EXAMPLE + Get-PokeEncounterMethod -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterMethod.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/encounter-method" } + 'index_ById' { $resource_uri = "/encounter-method/$id" } + 'index_ByName' { $resource_uri = ("/encounter-method/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_EncounterMethodParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\encounter\Get-PokeEncounterMethod.ps1' 107 +#Region '.\Public\evolution\Get-PokeEvolutionChain.ps1' 0 +function Get-PokeEvolutionChain { +<# + .SYNOPSIS + Gets evolution chains from PokeAPI + + .DESCRIPTION + The Get-PokeEvolutionChain cmdlet gets evolution chains from PokeAPI + + Evolution chains are essentially family trees. They start with the lowest stage + within a family and detail evolution conditions for each as well as Pokemon + they can evolve into up through the hierarchy. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeEvolutionChain + + Gets the first 20 evolution chains sorted by id + + .EXAMPLE + Get-PokeEvolutionChain -id 1 + + Gets the evolution chain with the defined id + + .EXAMPLE + Get-PokeEvolutionChain -name ditto + + Gets the evolution chain with the defined name + + .EXAMPLE + Get-PokeEvolutionChain -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/evolution/Get-PokeEvolutionChain.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/evolution-chain" } + 'index_ById' { $resource_uri = "/evolution-chain/$id" } + 'index_ByName' { $resource_uri = ("/evolution-chain/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_EvolutionChainParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\evolution\Get-PokeEvolutionChain.ps1' 108 +#Region '.\Public\evolution\Get-PokeEvolutionTrigger.ps1' 0 +function Get-PokeEvolutionTrigger { +<# + .SYNOPSIS + Gets evolution triggers from PokeAPI + + .DESCRIPTION + The Get-PokeEvolutionTrigger cmdlet gets evolution triggers from PokeAPI + + Evolution triggers are the events and conditions that cause a Pokemon to evolve + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeEvolutionTrigger + + Gets the first 20 evolution triggers sorted by id + + .EXAMPLE + Get-PokeEvolutionTrigger -id 1 + + Gets the evolution trigger with the defined id + + .EXAMPLE + Get-PokeEvolutionTrigger -name ditto + + Gets the evolution trigger with the defined name + + .EXAMPLE + Get-PokeEvolutionTrigger -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/evolution/Get-PokeEvolutionTrigger.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/evolution-trigger" } + 'index_ById' { $resource_uri = "/evolution-trigger/$id" } + 'index_ByName' { $resource_uri = ("/evolution-trigger/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_EvolutionTriggerParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\evolution\Get-PokeEvolutionTrigger.ps1' 106 +#Region '.\Public\game\Get-PokeGameGeneration.ps1' 0 +function Get-PokeGameGeneration { +<# + .SYNOPSIS + Gets game generations from PokeAPI + + .DESCRIPTION + The Get-PokeGameGeneration cmdlet gets game generations from PokeAPI + + A generation is a grouping of the Pokemon games that separates them based + on the Pokemon they include. + + In each generation, a new set of Pokemon, Moves, Abilities and Types that + did not exist in the previous generation are released. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeGameGeneration + + Gets the first 20 game generations sorted by id + + .EXAMPLE + Get-PokeGameGeneration -id 1 + + Gets the game generation with the defined id + + .EXAMPLE + Get-PokeGameGeneration -name ditto + + Gets the game generation with the defined name + + .EXAMPLE + Get-PokeGameGeneration -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameGeneration.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/generation" } + 'index_ById' { $resource_uri = "/generation/$id" } + 'index_ByName' { $resource_uri = ("/generation/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_GameGenerationParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\game\Get-PokeGameGeneration.ps1' 110 +#Region '.\Public\game\Get-PokeGamePokedex.ps1' 0 +function Get-PokeGamePokedex { +<# + .SYNOPSIS + Gets game pokedexes from PokeAPI + + .DESCRIPTION + The Get-PokeGamePokedex cmdlet gets game pokedexes from PokeAPI + + A Pokedex is a handheld electronic encyclopedia device; one which is capable of + recording and retaining information of the various Pokemon in a given region with the + exception of the national dex and some smaller dexes related to portions of a region + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeGamePokedex + + Gets the first 20 game pokedexes sorted by id + + .EXAMPLE + Get-PokeGamePokedex -id 1 + + Gets the game pokedex with the defined id + + .EXAMPLE + Get-PokeGamePokedex -name ditto + + Gets the game pokedex with the defined name + + .EXAMPLE + Get-PokeGamePokedex -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGamePokedex.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pokedex" } + 'index_ById' { $resource_uri = "/pokedex/$id" } + 'index_ByName' { $resource_uri = ("/pokedex/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_GamePokedexParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\game\Get-PokeGamePokedex.ps1' 108 +#Region '.\Public\game\Get-PokeGameVersion.ps1' 0 +function Get-PokeGameVersion { +<# + .SYNOPSIS + Gets game versions from PokeAPI + + .DESCRIPTION + The Get-PokeGameVersion cmdlet gets game versions from PokeAPI + + Versions of the games, e.g., Red, Blue or Yellow + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeGameVersion + + Gets the first 20 game versions sorted by id + + .EXAMPLE + Get-PokeGameVersion -id 1 + + Gets the game version with the defined id + + .EXAMPLE + Get-PokeGameVersion -name ditto + + Gets the game version with the defined name + + .EXAMPLE + Get-PokeGameVersion -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameVersion.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/version" } + 'index_ById' { $resource_uri = "/version/$id" } + 'index_ByName' { $resource_uri = ("/version/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_GameVersionParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\game\Get-PokeGameVersion.ps1' 106 +#Region '.\Public\game\Get-PokeGameVersionGroup.ps1' 0 +function Get-PokeGameVersionGroup { +<# + .SYNOPSIS + Gets game version groups from PokeAPI + + .DESCRIPTION + The Get-PokeGameVersionGroup cmdlet gets game version groups + from PokeAPI + + Version groups categorize highly similar versions of the games + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeGameVersionGroup + + Gets the first 20 game version groups sorted by id + + .EXAMPLE + Get-PokeGameVersionGroup -id 1 + + Gets the game version group with the defined id + + .EXAMPLE + Get-PokeGameVersionGroup -name ditto + + Gets the game version group with the defined name + + .EXAMPLE + Get-PokeGameVersionGroup -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameVersionGroup.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/version-group" } + 'index_ById' { $resource_uri = "/version-group/$id" } + 'index_ByName' { $resource_uri = ("/version-group/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_GameVersionGroupParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\game\Get-PokeGameVersionGroup.ps1' 107 +#Region '.\Public\item\Get-PokeItem.ps1' 0 +function Get-PokeItem { +<# + .SYNOPSIS + Gets items from PokeAPI + + .DESCRIPTION + The Get-PokeItem cmdlet gets items from PokeAPI + + An item is an object in the games which the player can pick up, + keep in their bag, and use in some manner + + They have various uses, including healing, powering up, helping catch + Pokemon, or to access a new area + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeItem + + Gets the first 20 items sorted by id + + .EXAMPLE + Get-PokeItem -id 1 + + Gets the item with the defined id + + .EXAMPLE + Get-PokeItem -name ditto + + Gets the item with the defined name + + .EXAMPLE + Get-PokeItem -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItem.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/item" } + 'index_ById' { $resource_uri = "/item/$id" } + 'index_ByName' { $resource_uri = ("/item/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_ItemParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\item\Get-PokeItem.ps1' 110 +#Region '.\Public\item\Get-PokeItemAttribute.ps1' 0 +function Get-PokeItemAttribute { +<# + .SYNOPSIS + Gets item attributes from PokeAPI + + .DESCRIPTION + The Get-PokeItemAttribute cmdlet gets item attributes from PokeAPI + + Item attributes define particular aspects of items, + e.g. "usable in battle" or "consumable" + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeItemAttribute + + Gets the first 20 item attributes sorted by id + + .EXAMPLE + Get-PokeItemAttribute -id 1 + + Gets the item attribute with the defined id + + .EXAMPLE + Get-PokeItemAttribute -name ditto + + Gets the item attribute with the defined name + + .EXAMPLE + Get-PokeItemAttribute -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemAttribute.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/item-attribute" } + 'index_ById' { $resource_uri = "/item-attribute/$id" } + 'index_ByName' { $resource_uri = ("/item-attribute/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_ItemAttributeParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\item\Get-PokeItemAttribute.ps1' 107 +#Region '.\Public\item\Get-PokeItemCategory.ps1' 0 +function Get-PokeItemCategory { +<# + .SYNOPSIS + Gets item categories from PokeAPI + + .DESCRIPTION + The Get-PokeItemCategory cmdlet gets item categories from PokeAPI + + Item categories determine where items will be placed in the players bag + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeItemCategory + + Gets the first 20 item categories sorted by id + + .EXAMPLE + Get-PokeItemCategory -id 1 + + Gets the item category with the defined id + + .EXAMPLE + Get-PokeItemCategory -name ditto + + Gets the item category with the defined name + + .EXAMPLE + Get-PokeItemCategory -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemCategory.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/item-category" } + 'index_ById' { $resource_uri = "/item-category/$id" } + 'index_ByName' { $resource_uri = ("/item-category/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_ItemCategoryParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\item\Get-PokeItemCategory.ps1' 106 +#Region '.\Public\item\Get-PokeItemFlingEffect.ps1' 0 +function Get-PokeItemFlingEffect { +<# + .SYNOPSIS + Gets item fling effects from PokeAPI + + .DESCRIPTION + The Get-PokeItemFlingEffect cmdlet gets item fling effects from PokeAPI + + The various effects of the move "Fling" when used with different items + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeItemFlingEffect + + Gets the first 20 item fling effects sorted by id + + .EXAMPLE + Get-PokeItemFlingEffect -id 1 + + Gets the item fling effect with the defined id + + .EXAMPLE + Get-PokeItemFlingEffect -name ditto + + Gets the item fling effect with the defined name + + .EXAMPLE + Get-PokeItemFlingEffect -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemFlingEffect.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/item-fling-effect" } + 'index_ById' { $resource_uri = "/item-fling-effect/$id" } + 'index_ByName' { $resource_uri = ("/item-fling-effect/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_ItemFlingEffectParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\item\Get-PokeItemFlingEffect.ps1' 106 +#Region '.\Public\item\Get-PokeItemPocket.ps1' 0 +function Get-PokeItemPocket { +<# + .SYNOPSIS + Gets item pockets from PokeAPI + + .DESCRIPTION + The Get-PokeItemPocket cmdlet gets item pockets from PokeAPI + + Pockets within the players bag used for storing items by category + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeItemPocket + + Gets the first 20 item pockets sorted by id + + .EXAMPLE + Get-PokeItemPocket -id 1 + + Gets the item pocket with the defined id + + .EXAMPLE + Get-PokeItemPocket -name ditto + + Gets the item pocket with the defined name + + .EXAMPLE + Get-PokeItemPocket -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemPocket.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/item-pocket" } + 'index_ById' { $resource_uri = "/item-pocket/$id" } + 'index_ByName' { $resource_uri = ("/item-pocket/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_ItemPocketParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\item\Get-PokeItemPocket.ps1' 106 +#Region '.\Public\location\Get-PokeLocation.ps1' 0 +function Get-PokeLocation { +<# + .SYNOPSIS + Gets locations from PokeAPI + + .DESCRIPTION + The Get-PokeLocation cmdlet gets locations from PokeAPI + + Locations that can be visited within the games + + Locations make up sizable portions of regions, like cities or routes + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeLocation + + Gets the first 20 locations sorted by id + + .EXAMPLE + Get-PokeLocation -id 1 + + Gets the location with the defined id + + .EXAMPLE + Get-PokeLocation -name ditto + + Gets the location with the defined name + + .EXAMPLE + Get-PokeLocation -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocation.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/location" } + 'index_ById' { $resource_uri = "/location/$id" } + 'index_ByName' { $resource_uri = ("/location/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_LocationParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\location\Get-PokeLocation.ps1' 108 +#Region '.\Public\location\Get-PokeLocationArea.ps1' 0 +function Get-PokeLocationArea { +<# + .SYNOPSIS + Gets location areas from PokeAPI + + .DESCRIPTION + The Get-PokeLocationArea cmdlet gets location areas from PokeAPI + + Location areas are sections of areas, such as floors in a building or cave + + Each area has its own set of possible Pokemon encounters + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeLocationArea + + Gets the first 20 location areas sorted by id + + .EXAMPLE + Get-PokeLocationArea -id 1 + + Gets the location area with the defined id + + .EXAMPLE + Get-PokeLocationArea -name ditto + + Gets the location area with the defined name + + .EXAMPLE + Get-PokeLocationArea -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationArea.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/location-area" } + 'index_ById' { $resource_uri = "/location-area/$id" } + 'index_ByName' { $resource_uri = ("/location-area/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_LocationAreaParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\location\Get-PokeLocationArea.ps1' 108 +#Region '.\Public\location\Get-PokeLocationPalParkArea.ps1' 0 +function Get-PokeLocationPalParkArea { +<# + .SYNOPSIS + Gets pal park areas from PokeAPI + + .DESCRIPTION + The Get-PokeLocationPalParkArea cmdlet gets pal park areas from PokeAPI + + Areas used for grouping Pokemon encounters in Pal Park + + They're like habitats that are specific to Pal Park + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeLocationPalParkArea + + Gets the first 20 pal park areas sorted by id + + .EXAMPLE + Get-PokeLocationPalParkArea -id 1 + + Gets the pal park area with the defined id + + .EXAMPLE + Get-PokeLocationPalParkArea -name ditto + + Gets the pal park area with the defined name + + .EXAMPLE + Get-PokeLocationPalParkArea -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationPalParkArea.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pal-park-area" } + 'index_ById' { $resource_uri = "/pal-park-area/$id" } + 'index_ByName' { $resource_uri = ("/pal-park-area/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_LocationPalParkAreaParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\location\Get-PokeLocationPalParkArea.ps1' 108 +#Region '.\Public\location\Get-PokeLocationRegion.ps1' 0 +function Get-PokeLocationRegion { +<# + .SYNOPSIS + Gets regions from PokeAPI + + .DESCRIPTION + The Get-PokeLocationRegion cmdlet gets regions from PokeAPI + + A region is an organized area of the Pokemon world + + Most often, the main difference between regions is the species of + Pokemon that can be encountered within them. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeLocationRegion + + Gets the first 20 regions sorted by id + + .EXAMPLE + Get-PokeLocationRegion -id 1 + + Gets the region with the defined id + + .EXAMPLE + Get-PokeLocationRegion -name ditto + + Gets the region with the defined name + + .EXAMPLE + Get-PokeLocationRegion -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationRegion.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/region" } + 'index_ById' { $resource_uri = "/region/$id" } + 'index_ByName' { $resource_uri = ("/region/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_LocationRegionParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\location\Get-PokeLocationRegion.ps1' 109 +#Region '.\Public\machine\Get-PokeMachine.ps1' 0 +function Get-PokeMachine { +<# + .SYNOPSIS + Gets machines from PokeAPI + + .DESCRIPTION + The Get-PokeMachine cmdlet gets machines from PokeAPI + + Machines are the representation of items that teach moves to Pokemon + + They vary from version to version, so it is not certain that one specific + TM or HM corresponds to a single Machine + + .PARAMETER id + Defines id of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeMachine + + Gets the first 20 machines sorted by id + + .EXAMPLE + Get-PokeMachine -id 1 + + Gets the machine with the defined id + + .EXAMPLE + Get-PokeMachine -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/machine/Get-PokeMachine.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/machine" } + 'index_ById' { $resource_uri = "/machine/$id" } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_MachineParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\machine\Get-PokeMachine.ps1' 96 +#Region '.\Public\move\Get-PokeMove.ps1' 0 +function Get-PokeMove { +<# + .SYNOPSIS + Gets moves from PokeAPI + + .DESCRIPTION + The Get-PokeMove cmdlet gets moves from PokeAPI + + Moves are the skills of Pokemon in battle. In battle, a Pokemon uses one move each turn. + + Some moves (including those learned by Hidden Machine) can be used outside of battle as well, + usually for the purpose of removing obstacles or exploring new areas. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeMove + + Gets the first 20 moves sorted by id + + .EXAMPLE + Get-PokeMove -id 1 + + Gets the move with the defined id + + .EXAMPLE + Get-PokeMove -name ditto + + Gets the move with the defined name + + .EXAMPLE + Get-PokeMove -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMove.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/move" } + 'index_ById' { $resource_uri = "/move/$id" } + 'index_ByName' { $resource_uri = ("/move/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_MoveParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\move\Get-PokeMove.ps1' 109 +#Region '.\Public\move\Get-PokeMoveAilment.ps1' 0 +function Get-PokeMoveAilment { +<# + .SYNOPSIS + Gets move ailments from PokeAPI + + .DESCRIPTION + The Get-PokeMoveAilment cmdlet gets move ailments from PokeAPI + + Move Ailments are status conditions caused by moves used during battle + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeMoveAilment + + Gets the first 20 move ailments sorted by id + + .EXAMPLE + Get-PokeMoveAilment -id 1 + + Gets the move ailment with the defined id + + .EXAMPLE + Get-PokeMoveAilment -name ditto + + Gets the move ailment with the defined name + + .EXAMPLE + Get-PokeMoveAilment -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveAilment.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/move-ailment" } + 'index_ById' { $resource_uri = "/move-ailment/$id" } + 'index_ByName' { $resource_uri = ("/move-ailment/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_MoveAilmentParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\move\Get-PokeMoveAilment.ps1' 106 +#Region '.\Public\move\Get-PokeMoveBattleStyle.ps1' 0 +function Get-PokeMoveBattleStyle { +<# + .SYNOPSIS + Gets move battle styles from PokeAPI + + .DESCRIPTION + The Get-PokeMoveBattleStyle cmdlet gets move battle styles from PokeAPI + + Styles of moves when used in the Battle Palace + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeMoveBattleStyle + + Gets the first 20 move battle styles sorted by id + + .EXAMPLE + Get-PokeMoveBattleStyle -id 1 + + Gets the move battle style with the defined id + + .EXAMPLE + Get-PokeMoveBattleStyle -name ditto + + Gets the move battle style with the defined name + + .EXAMPLE + Get-PokeMoveBattleStyle -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveBattleStyle.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/move-battle-style" } + 'index_ById' { $resource_uri = "/move-battle-style/$id" } + 'index_ByName' { $resource_uri = ("/move-battle-style/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_MoveBattleStyleParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\move\Get-PokeMoveBattleStyle.ps1' 106 +#Region '.\Public\move\Get-PokeMoveCategory.ps1' 0 +function Get-PokeMoveCategory { +<# + .SYNOPSIS + Gets move categories from PokeAPI + + .DESCRIPTION + The Get-PokeMoveCategory cmdlet gets move categories from PokeAPI + + Very general categories that loosely group move effects + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeMoveCategory + + Gets the first 20 move categories sorted by id + + .EXAMPLE + Get-PokeMoveCategory -id 1 + + Gets the move category with the defined id + + .EXAMPLE + Get-PokeMoveCategory -name ditto + + Gets the move category with the defined name + + .EXAMPLE + Get-PokeMoveCategory -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveCategory.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/move-category" } + 'index_ById' { $resource_uri = "/move-category/$id" } + 'index_ByName' { $resource_uri = ("/move-category/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_MoveCategoryParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\move\Get-PokeMoveCategory.ps1' 106 +#Region '.\Public\move\Get-PokeMoveDamageClass.ps1' 0 +function Get-PokeMoveDamageClass { +<# + .SYNOPSIS + Gets move damage classes from PokeAPI + + .DESCRIPTION + The Get-PokeMoveDamageClass cmdlet gets move damage classes from PokeAPI + + Damage classes moves can have, e.g. physical, special, or non-damaging + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeMoveDamageClass + + Gets the first 20 move damage classes sorted by id + + .EXAMPLE + Get-PokeMoveDamageClass -id 1 + + Gets the move damage class with the defined id + + .EXAMPLE + Get-PokeMoveDamageClass -name ditto + + Gets the move damage class with the defined name + + .EXAMPLE + Get-PokeMoveDamageClass -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveDamageClass.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/move-damage-class" } + 'index_ById' { $resource_uri = "/move-damage-class/$id" } + 'index_ByName' { $resource_uri = ("/move-damage-class/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_MoveDamageClassParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\move\Get-PokeMoveDamageClass.ps1' 106 +#Region '.\Public\move\Get-PokeMoveLearnMethod.ps1' 0 +function Get-PokeMoveLearnMethod { +<# + .SYNOPSIS + Gets move learn methods from PokeAPI + + .DESCRIPTION + The Get-PokeMoveLearnMethod cmdlet gets move learn methods from PokeAPI + + Methods by which Pokemon can learn moves + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeMoveLearnMethod + + Gets the first 20 move learn methods sorted by id + + .EXAMPLE + Get-PokeMoveLearnMethod -id 1 + + Gets the move learn method with the defined id + + .EXAMPLE + Get-PokeMoveLearnMethod -name ditto + + Gets the move learn method with the defined name + + .EXAMPLE + Get-PokeMoveLearnMethod -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveLearnMethod.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/move-learn-method" } + 'index_ById' { $resource_uri = "/move-learn-method/$id" } + 'index_ByName' { $resource_uri = ("/move-learn-method/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_MoveLearnMethodParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\move\Get-PokeMoveLearnMethod.ps1' 106 +#Region '.\Public\move\Get-PokeMoveTarget.ps1' 0 +function Get-PokeMoveTarget { +<# + .SYNOPSIS + Gets move targets from PokeAPI + + .DESCRIPTION + The Get-PokeMoveTarget cmdlet gets move targets from PokeAPI + + Targets moves can be directed at during battle + + Targets can be Pokemon, environments or even other moves. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeMoveTarget + + Gets the first 20 move targets sorted by id + + .EXAMPLE + Get-PokeMoveTarget -id 1 + + Gets the move target with the defined id + + .EXAMPLE + Get-PokeMoveTarget -name ditto + + Gets the move target with the defined name + + .EXAMPLE + Get-PokeMoveTarget -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveTarget.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/move-target" } + 'index_ById' { $resource_uri = "/move-target/$id" } + 'index_ByName' { $resource_uri = ("/move-target/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_MoveTargetParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\move\Get-PokeMoveTarget.ps1' 108 +#Region '.\Public\pokemon\Get-PokePokemon.ps1' 0 +function Get-PokePokemon { +<# + .SYNOPSIS + Gets Pokemon from PokeAPI + + .DESCRIPTION + The Get-PokePokemon cmdlet gets Pokemon from PokeAPI + + Pokemon are the creatures that inhabit the world of the Pokemon games. + They can be caught using Pokeballs and trained by battling with other Pokemon. + Each Pokemon belongs to a specific species but may take on a variant which makes + it differ from other Pokemon of the same species, such as base stats, + available abilities and typings. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemon + + Gets the first 20 pokemon sorted by id + + .EXAMPLE + Get-PokePokemon -id 1 + + Gets the pokemon with the defined id + + .EXAMPLE + Get-PokePokemon -name ditto + + Gets the pokemon with the defined name + + .EXAMPLE + Get-PokePokemon -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemon.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pokemon" } + 'index_ById' { $resource_uri = "/pokemon/$id" } + 'index_ByName' { $resource_uri = ("/pokemon/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\pokemon\Get-PokePokemon.ps1' 110 +#Region '.\Public\pokemon\Get-PokePokemonAbility.ps1' 0 +function Get-PokePokemonAbility { +<# + .SYNOPSIS + Gets Pokemon abilities from PokeAPI + + .DESCRIPTION + The Get-PokePokemonAbility cmdlet gets Pokemon abilities from PokeAPI + + Abilities provide passive effects for Pokemon in battle or in the overworld. + Pokemon have multiple possible abilities but can have only one ability at a time + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonAbility + + Gets the first 20 Pokemon abilities sorted by id + + .EXAMPLE + Get-PokePokemonAbility -id 1 + + Gets the Pokemon ability with the defined id + + .EXAMPLE + Get-PokePokemonAbility -name ditto + + Gets the Pokemon ability with the defined name + + .EXAMPLE + Get-PokePokemonAbility -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonAbility.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/ability" } + 'index_ById' { $resource_uri = "/ability/$id" } + 'index_ByName' { $resource_uri = ("/ability/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonAbilityParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\pokemon\Get-PokePokemonAbility.ps1' 107 +#Region '.\Public\pokemon\Get-PokePokemonCharacteristic.ps1' 0 +function Get-PokePokemonCharacteristic { +<# + .SYNOPSIS + Gets Pokemon characteristics from PokeAPI + + .DESCRIPTION + The Get-PokePokemonCharacteristic cmdlet gets + Pokemon characteristics from PokeAPI + + Characteristics indicate which stat contains a Pokemon's highest IV. + A Pokemon's Characteristic is determined by the remainder + of its highest IV divided by 5 (gene_modulo). + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonCharacteristic + + Gets the first 20 Pokemon characteristics sorted by id + + .EXAMPLE + Get-PokePokemonCharacteristic -id 1 + + Gets the Pokemon characteristic with the defined id + + .EXAMPLE + Get-PokePokemonCharacteristic -name ditto + + Gets the Pokemon characteristic with the defined name + + .EXAMPLE + Get-PokePokemonCharacteristic -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonCharacteristic.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/characteristic" } + 'index_ById' { $resource_uri = "/characteristic/$id" } + 'index_ByName' { $resource_uri = ("/characteristic/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonCharacteristicParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\pokemon\Get-PokePokemonCharacteristic.ps1' 109 +#Region '.\Public\pokemon\Get-PokePokemonColor.ps1' 0 +function Get-PokePokemonColor { +<# + .SYNOPSIS + Gets pokemon colors from PokeAPI + + .DESCRIPTION + The Get-PokePokemonColor cmdlet gets pokemon colors from PokeAPI + + Colors used for sorting Pokemon in a Pokedex. The color listed in the Pokedex + is usually the color most apparent or covering each Pokemon's body. + No orange category exists; Pokemon that are primarily orange are listed as red or brown. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonColor + + Gets the first 20 pokemon colors sorted by id + + .EXAMPLE + Get-PokePokemonColor -id 1 + + Gets the pokemon color with the defined id + + .EXAMPLE + Get-PokePokemonColor -name ditto + + Gets the pokemon color with the defined name + + .EXAMPLE + Get-PokePokemonColor -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonColor.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pokemon-color" } + 'index_ById' { $resource_uri = "/pokemon-color/$id" } + 'index_ByName' { $resource_uri = ("/pokemon-color/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonColorParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\pokemon\Get-PokePokemonColor.ps1' 108 +#Region '.\Public\pokemon\Get-PokePokemonEggGroup.ps1' 0 +function Get-PokePokemonEggGroup { +<# + .SYNOPSIS + Gets egg groups from PokeAPI + + .DESCRIPTION + The Get-PokePokemonEggGroup cmdlet gets egg groups from PokeAPI + + Egg Groups are categories which determine which Pokemon are + able to interbreed. Pokemon may belong to either one or two Egg Groups + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonEggGroup + + Gets the first 20 egg groups sorted by id + + .EXAMPLE + Get-PokePokemonEggGroup -id 1 + + Gets the egg group with the defined id + + .EXAMPLE + Get-PokePokemonEggGroup -name ditto + + Gets the egg group with the defined name + + .EXAMPLE + Get-PokePokemonEggGroup -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonEggGroup.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/egg-group" } + 'index_ById' { $resource_uri = "/egg-group/$id" } + 'index_ByName' { $resource_uri = ("/egg-group/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonEggGroupParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\pokemon\Get-PokePokemonEggGroup.ps1' 107 +#Region '.\Public\pokemon\Get-PokePokemonEncounter.ps1' 0 +function Get-PokePokemonEncounter { +<# + .SYNOPSIS + Gets pokemon location areas from PokeAPI + + .DESCRIPTION + The Get-PokePokemonEncounter cmdlet gets pokemon location areas from PokeAPI + + Pokemon Location Areas are ares where Pokemon can be found + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .EXAMPLE + Get-PokePokemonEncounter -id 1 + + Gets the pokemon location area with the defined id + + .EXAMPLE + Get-PokePokemonEncounter -name ditto + + Gets the pokemon location area with the defined name + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonEncounter.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ById')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ById' { $resource_uri = "/pokemon/$id/encounters" } + 'index_ByName' { $resource_uri = ("/pokemon/$name/encounters").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonEncountersParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\pokemon\Get-PokePokemonEncounter.ps1' 65 +#Region '.\Public\pokemon\Get-PokePokemonForm.ps1' 0 +function Get-PokeBerry { +<# + .SYNOPSIS + Gets pokemon forms from PokeAPI + + .DESCRIPTION + The Get-PokeBerry cmdlet gets pokemon forms from PokeAPI + + Some Pokemon may appear in one of multiple, visually different forms. + These differences are purely cosmetic. For variations within a Pokemon species, + which do differ in more than just visuals, the + 'Pokemon' entity is used to represent such a variety. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeBerry + + Gets the first 20 pokemon forms sorted by id + + .EXAMPLE + Get-PokeBerry -id 1 + + Gets the pokemon form with the defined id + + .EXAMPLE + Get-PokeBerry -name ditto + + Gets the pokemon form with the defined name + + .EXAMPLE + Get-PokeBerry -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokeBerry.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pokemon-form" } + 'index_ById' { $resource_uri = "/pokemon-form/$id" } + 'index_ByName' { $resource_uri = ("/pokemon-form/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonFormParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\pokemon\Get-PokePokemonForm.ps1' 109 +#Region '.\Public\pokemon\Get-PokePokemonGender.ps1' 0 +function Get-PokePokemonGender { +<# + .SYNOPSIS + Gets genders from PokeAPI + + .DESCRIPTION + The Get-PokePokemonGender cmdlet gets genders from PokeAPI + + Genders were introduced in Generation II for the purposes of + breeding Pokemon but can also result in visual differences or + even different evolutionary lines + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonGender + + Gets the first 20 genders sorted by id + + .EXAMPLE + Get-PokePokemonGender -id 1 + + Gets the gender with the defined id + + .EXAMPLE + Get-PokePokemonGender -name ditto + + Gets the gender with the defined name + + .EXAMPLE + Get-PokePokemonGender -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonGender.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/gender" } + 'index_ById' { $resource_uri = "/gender/$id" } + 'index_ByName' { $resource_uri = ("/gender/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonGenderParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\pokemon\Get-PokePokemonGender.ps1' 108 +#Region '.\Public\pokemon\Get-PokePokemonGrowthRate.ps1' 0 +function Get-PokePokemonGrowthRate { +<# + .SYNOPSIS + Gets growth rates from PokeAPI + + .DESCRIPTION + The Get-PokePokemonGrowthRate cmdlet gets growth rates from PokeAPI + + Growth rates are the speed with which Pokemon gain levels through experience + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonGrowthRate + + Gets the first 20 growth rates sorted by id + + .EXAMPLE + Get-PokePokemonGrowthRate -id 1 + + Gets the growth rate with the defined id + + .EXAMPLE + Get-PokePokemonGrowthRate -name ditto + + Gets the growth rate with the defined name + + .EXAMPLE + Get-PokePokemonGrowthRate -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonGrowthRate.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/growth-rate" } + 'index_ById' { $resource_uri = "/growth-rate/$id" } + 'index_ByName' { $resource_uri = ("/growth-rate/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonGrowthRateParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\pokemon\Get-PokePokemonGrowthRate.ps1' 106 +#Region '.\Public\pokemon\Get-PokePokemonHabitat.ps1' 0 +function Get-PokePokemonHabitat { +<# + .SYNOPSIS + Gets pokemon habitats from PokeAPI + + .DESCRIPTION + The Get-PokePokemonHabitat cmdlet gets pokemon habitats from PokeAPI + + Habitats are generally different terrain Pokemon can be found + in but can also be areas designated for rare or legendary Pokemon. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonHabitat + + Gets the first 20 pokemon habitats sorted by id + + .EXAMPLE + Get-PokePokemonHabitat -id 1 + + Gets the pokemon habitat with the defined id + + .EXAMPLE + Get-PokePokemonHabitat -name ditto + + Gets the pokemon habitat with the defined name + + .EXAMPLE + Get-PokePokemonHabitat -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonHabitat.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pokemon-habitat" } + 'index_ById' { $resource_uri = "/pokemon-habitat/$id" } + 'index_ByName' { $resource_uri = ("/pokemon-habitat/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonHabitatParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\pokemon\Get-PokePokemonHabitat.ps1' 107 +#Region '.\Public\pokemon\Get-PokePokemonNature.ps1' 0 +function Get-PokePokemonNature { +<# + .SYNOPSIS + Gets natures from PokeAPI + + .DESCRIPTION + The Get-PokePokemonNature cmdlet gets natures from PokeAPI + + Natures influence how a Pokemon's stats grow + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonNature + + Gets the first 20 natures sorted by id + + .EXAMPLE + Get-PokePokemonNature -id 1 + + Gets the nature with the defined id + + .EXAMPLE + Get-PokePokemonNature -name ditto + + Gets the nature with the defined name + + .EXAMPLE + Get-PokePokemonNature -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonNature.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/nature" } + 'index_ById' { $resource_uri = "/nature/$id" } + 'index_ByName' { $resource_uri = ("/nature/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonNatureParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\pokemon\Get-PokePokemonNature.ps1' 106 +#Region '.\Public\pokemon\Get-PokePokemonPokeathlonStat.ps1' 0 +function Get-PokePokemonPokeathlonStat { +<# + .SYNOPSIS + Gets pokeathlon stats from PokeAPI + + .DESCRIPTION + The Get-PokePokemonPokeathlonStat cmdlet gets pokeathlon stats from PokeAPI + + Pokeathlon Stats are different attributes of a Pokemon's performance in Pokeathlons. + In Pokeathlons, competitions happen on different courses; one for each + of the different Pokeathlon stats + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonPokeathlonStat + + Gets the first 20 pokeathlon stats sorted by id + + .EXAMPLE + Get-PokePokemonPokeathlonStat -id 1 + + Gets the pokeathlon stat with the defined id + + .EXAMPLE + Get-PokePokemonPokeathlonStat -name ditto + + Gets the pokeathlon stat with the defined name + + .EXAMPLE + Get-PokePokemonPokeathlonStat -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonPokeathlonStat.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pokeathlon-stat" } + 'index_ById' { $resource_uri = "/pokeathlon-stat/$id" } + 'index_ByName' { $resource_uri = ("/pokeathlon-stat/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonPokeathlonStatParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\pokemon\Get-PokePokemonPokeathlonStat.ps1' 108 +#Region '.\Public\pokemon\Get-PokePokemonShape.ps1' 0 +function Get-PokePokemonShape { +<# + .SYNOPSIS + Gets pokemon shapes from PokeAPI + + .DESCRIPTION + The Get-PokePokemonShape cmdlet gets pokemon shapes from PokeAPI + + Shapes used for sorting Pokemon in a Pokedex + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonShape + + Gets the first 20 pokemon shapes sorted by id + + .EXAMPLE + Get-PokePokemonShape -id 1 + + Gets the pokemon shape with the defined id + + .EXAMPLE + Get-PokePokemonShape -name ditto + + Gets the pokemon shape with the defined name + + .EXAMPLE + Get-PokePokemonShape -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonShape.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pokemon-shape" } + 'index_ById' { $resource_uri = "/pokemon-shape/$id" } + 'index_ByName' { $resource_uri = ("/pokemon-shape/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonShapeParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\pokemon\Get-PokePokemonShape.ps1' 106 +#Region '.\Public\pokemon\Get-PokePokemonSpecies.ps1' 0 +function Get-PokePokemonSpecies { +<# + .SYNOPSIS + Gets pokemon species from PokeAPI + + .DESCRIPTION + The Get-PokePokemonSpecies cmdlet gets pokemon species from PokeAPI + + A Pokemon Species forms the basis for at least one Pokemon. Attributes of a + Pokemon species are shared across all varieties of Pokemon within the species. + + A good example is Wormadam; Wormadam is the species which can be found in three + different varieties, Wormadam-Trash, Wormadam-Sandy and Wormadam-Plant. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonSpecies + + Gets the first 20 pokemon species sorted by id + + .EXAMPLE + Get-PokePokemonSpecies -id 1 + + Gets the pokemon species with the defined id + + .EXAMPLE + Get-PokePokemonSpecies -name ditto + + Gets the pokemon species with the defined name + + .EXAMPLE + Get-PokePokemonSpecies -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonSpecies.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/pokemon-species" } + 'index_ById' { $resource_uri = "/pokemon-species/$id" } + 'index_ByName' { $resource_uri = ("/pokemon-species/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonSpeciesParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\pokemon\Get-PokePokemonSpecies.ps1' 110 +#Region '.\Public\pokemon\Get-PokePokemonStat.ps1' 0 +function Get-PokePokemonStat { +<# + .SYNOPSIS + Gets pokemon stats from PokeAPI + + .DESCRIPTION + The Get-PokePokemonStat cmdlet gets pokemon stats from PokeAPI + + Stats determine certain aspects of battles. Each Pokemon has a + value for each stat which grows as they gain levels and can be + altered momentarily by effects in battles. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonStat + + Gets the first 20 pokemon stats sorted by id + + .EXAMPLE + Get-PokePokemonStat -id 1 + + Gets the pokemon stat with the defined id + + .EXAMPLE + Get-PokePokemonStat -name ditto + + Gets the pokemon stat with the defined name + + .EXAMPLE + Get-PokePokemonStat -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonStat.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/stat" } + 'index_ById' { $resource_uri = "/stat/$id" } + 'index_ByName' { $resource_uri = ("/stat/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonStatParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\pokemon\Get-PokePokemonStat.ps1' 108 +#Region '.\Public\pokemon\Get-PokePokemonType.ps1' 0 +function Get-PokePokemonType { +<# + .SYNOPSIS + Gets pokemon move type properties from PokeAPI + + .DESCRIPTION + The Get-PokePokemonType cmdlet gets pokemon move type properties from PokeAPI + + Types are properties for Pokemon and their moves. Each type has + three properties: which types of Pokemon it is super effective against, + which types of Pokemon it is not very effective against, and which + types of Pokemon it is completely ineffective against. + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokePokemonType + + Gets the first 20 pokemon move type properties sorted by id + + .EXAMPLE + Get-PokePokemonType -id 1 + + Gets the pokemon move type property with the defined id + + .EXAMPLE + Get-PokePokemonType -name ditto + + Gets the pokemon move type property with the defined name + + .EXAMPLE + Get-PokePokemonType -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonType.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/type" } + 'index_ById' { $resource_uri = "/type/$id" } + 'index_ByName' { $resource_uri = ("/type/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_PokemonTypeParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\pokemon\Get-PokePokemonType.ps1' 109 +#Region '.\Public\utility\Get-PokeEndpoint.ps1' 0 +function Get-PokeEndpoint { +<# + .SYNOPSIS + Gets endpoints from PokeAPI + + .DESCRIPTION + The Get-PokeEndpoint cmdlet gets endpoints from PokeAPI + + + .EXAMPLE + Get-PokeEndpoint + + Gets the endpoints from PokeAPI + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/utility/Get-PokeEndpoint.html +#> + + [CmdletBinding()] + Param () + + begin { + $PokeAPI_Endpoints = [System.Collections.Generic.List[object]]::new() + } + + process { + + $invoke_Request = Invoke-RestMethod -Uri "$Poke_Base_URI/" + + foreach ($property in $invoke_Request.PSObject.Properties) { + + $data = [PSCustomObject]@{ + name = $property.name + url = $property.value + } + + $PokeAPI_Endpoints.add($data) + + } + + $PokeAPI_Endpoints + + } + + end {} + +} +#EndRegion '.\Public\utility\Get-PokeEndpoint.ps1' 51 +#Region '.\Public\utility\Get-PokeLanguage.ps1' 0 +function Get-PokeLanguage { +<# + .SYNOPSIS + Gets languages from PokeAPI + + .DESCRIPTION + The Get-PokeLanguage cmdlet gets languages from PokeAPI + + Languages for translations of API resource information + + .PARAMETER id + Defines id of the resource + + .PARAMETER name + Defines name of the resource + + .PARAMETER offset + Defines the page number to return + + By default only 20 resources are returned + + .PARAMETER limit + Defines the amount of resources to return with each page + + By default only 20 resources are returned + + .PARAMETER allPages + Returns all resources from an endpoint + + As of 2024-02, there is no cap on how many resources can be + returned using the limit parameter. There is currently no real + use for this parameter and it was included simply to account if + pagination is introduced. + + .EXAMPLE + Get-PokeLanguage + + Gets the first 20 languages sorted by id + + .EXAMPLE + Get-PokeLanguage -id 1 + + Gets the language with the defined id + + .EXAMPLE + Get-PokeLanguage -name ditto + + Gets the language with the defined name + + .EXAMPLE + Get-PokeLanguage -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with + an id over 151 + + .NOTES + n/a + + .LINK + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/utility/Get-PokeLanguage.html +#> + + [CmdletBinding(DefaultParameterSetName = 'index_ByAll')] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ById')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$id, + + [Parameter(Mandatory = $true, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, ParameterSetName = 'index_ByName')] + [ValidateNotNullOrEmpty()] + [string]$name, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$offset, + + [Parameter(Mandatory = $false, ParameterSetName = 'index_ByAll')] + [ValidateRange(1, [Int]::MaxValue)] + [Int]$limit, + + [Parameter( Mandatory = $false, ParameterSetName = 'index_ByAll')] + [Switch]$allPages + ) + + begin {} + + process { + + switch ( $PSCmdlet.ParameterSetName ) { + 'index_ByAll' { $resource_uri = "/language" } + 'index_ById' { $resource_uri = "/language/$id" } + 'index_ByName' { $resource_uri = ("/language/$name").ToLower() } + } + + Write-Verbose "Running the [ $($PSCmdlet.ParameterSetName) ] parameterSet" + + Set-Variable -Name 'PokeAPI_LanguageParameters' -Value $PSBoundParameters -Scope Global -Force + + Invoke-PokeRequest -method GET -resource_Uri $resource_Uri -uri_Filter $PSBoundParameters -allPages:$allPages + + } + + end {} + +} +#EndRegion '.\Public\utility\Get-PokeLanguage.ps1' 106 diff --git a/build/PokeAPI_built_Results.xml b/build/PokeAPI_built_Results.xml new file mode 100644 index 0000000..8eed95e --- /dev/null +++ b/build/PokeAPI_built_Results.xml @@ -0,0 +1,3166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/build/PokeAPI_notBuilt_Results.xml b/build/PokeAPI_notBuilt_Results.xml new file mode 100644 index 0000000..43d0a87 --- /dev/null +++ b/build/PokeAPI_notBuilt_Results.xml @@ -0,0 +1,40772 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [0] Expected 0, but got 2. +[1] Expected 'PokeAPI.psd1 - 152', but got 152. +[2] Expected strings to be the same, but they were different. +Expected length: 18 +Actual length: 94 +Strings differ at index 0. +Expected: 'PokeAPI.psd1 - 152' +But was: 'Do not use wildcard or $null in this field. Explicitly specify a list for FunctionsToExport. ' + ^ +[3] Expected 'PokeAPI.psd1 - 161', but got 161. +[4] Expected strings to be the same, but they were different. +Expected length: 18 +Actual length: 92 +Strings differ at index 0. +Expected: 'PokeAPI.psd1 - 161' +But was: 'Do not use wildcard or $null in this field. Explicitly specify a list for AliasesToExport. ' + ^ + [0] at ($invoke_Results | Measure-Object).Count | Should -Be 0, C:\Celerium\Projects\_API\PokeAPI-PowerShellWrapper\tests\PSScriptAnalyzer.tests.ps1:149 +at <ScriptBlock>, C:\Celerium\Projects\_API\PokeAPI-PowerShellWrapper\tests\PSScriptAnalyzer.tests.ps1:149 +[1] at $result.Line | Should -Be "$($result.ScriptName) - $($result.Line)", C:\Celerium\Projects\_API\PokeAPI-PowerShellWrapper\tests\PSScriptAnalyzer.tests.ps1:155 +at <ScriptBlock>, C:\Celerium\Projects\_API\PokeAPI-PowerShellWrapper\tests\PSScriptAnalyzer.tests.ps1:155 +[2] at $result.Message | Should -Be "$($result.ScriptName) - $($result.Line)", C:\Celerium\Projects\_API\PokeAPI-PowerShellWrapper\tests\PSScriptAnalyzer.tests.ps1:156 +at <ScriptBlock>, C:\Celerium\Projects\_API\PokeAPI-PowerShellWrapper\tests\PSScriptAnalyzer.tests.ps1:156 +[3] at $result.Line | Should -Be "$($result.ScriptName) - $($result.Line)", C:\Celerium\Projects\_API\PokeAPI-PowerShellWrapper\tests\PSScriptAnalyzer.tests.ps1:155 +at <ScriptBlock>, C:\Celerium\Projects\_API\PokeAPI-PowerShellWrapper\tests\PSScriptAnalyzer.tests.ps1:155 +[4] at $result.Message | Should -Be "$($result.ScriptName) - $($result.Line)", C:\Celerium\Projects\_API\PokeAPI-PowerShellWrapper\tests\PSScriptAnalyzer.tests.ps1:156 +at <ScriptBlock>, C:\Celerium\Projects\_API\PokeAPI-PowerShellWrapper\tests\PSScriptAnalyzer.tests.ps1:156 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/build/Publish-celeriumModule.ps1 b/build/Publish-celeriumModule.ps1 new file mode 100644 index 0000000..101aa18 --- /dev/null +++ b/build/Publish-celeriumModule.ps1 @@ -0,0 +1,113 @@ +<# +.NOTES + Copyright 1990-2024 Celerium + + NAME: Publish-celeriumModule.ps1 + Type: PowerShell + + AUTHOR: David Schulte + DATE: 2023-09-11 + EMAIL: celerium@celerium.org + Updated: 2023-09-16 + + TODO: + +.SYNOPSIS + Publishes a PowerShell module to the PowerShell Gallery + +.DESCRIPTION + The Publish-celeriumModule script publishes a PowerShell module + to the PowerShell Gallery + +.PARAMETER moduleName + The name of the module to update help docs for + + Default value: PokeAPI + +.PARAMETER version + The build version to publish + +.PARAMETER NuGetApiKey + The PowerShell Gallery NuGetApiKey with permissions to + publish modules + +.EXAMPLE + .\Publish-celeriumModule.ps1 -Version 1.0.0 -NuGetApiKey 12345 -WhatIf -Verbose + + Shows what will happen if a module is pushed to the PowerShell Gallery + +.EXAMPLE + .\Publish-celeriumModule.ps1 -Version 1.0.0 -NuGetApiKey 12345 -Verbose + + Publishes a PowerShell module to the PowerShell Gallery + +.INPUTS + N\A + +.OUTPUTS + N\A + +.LINK + https://celerium.org + +#> + +[CmdletBinding(SupportsShouldProcess)] +param ( + [Parameter(Mandatory=$false)] + [ValidateNotNullOrEmpty()] + [String]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [string]$version, + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$NuGetApiKey + +) + +begin { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\build', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/build', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + $modulePath = Join-Path -Path $rootPath -ChildPath "\build\$moduleName\$version" + $modulePsd1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + +} + +process { + + try { + + if ( $($Test = Test-ModuleManifest -Path $modulePsd1 -ErrorAction SilentlyContinue; $?) ) { + + $publish_Params = @{ + Path = $modulePath + NuGetApiKey = $NuGetApiKey + WhatIf = $WhatIfPreference + } + + Publish-Module @publish_Params + + } + else{ + throw "The [ $moduleName ] module failed Test-ModuleManifest" + Write-Error $_ + } + + } + catch { + Write-Error $_ + exit 1 + } + +} + +end {} \ No newline at end of file diff --git a/build/Update-helpContent.ps1 b/build/Update-helpContent.ps1 new file mode 100644 index 0000000..9a2d374 --- /dev/null +++ b/build/Update-helpContent.ps1 @@ -0,0 +1,408 @@ +function Update-helpContent { +<# +.NOTES + Copyright 1990-2024 Celerium + + NAME: Update-helpContent.ps1 + Type: PowerShell + + AUTHOR: David Schulte + DATE: 2022-11-26 + EMAIL: celerium@celerium.org + Updated: 2023-09-16 + + TODO: + Find a better way to make\update the main module file, as of 2022-11 this script double generates markdown files + When run with PowerShell 7, examples with comma separated values turn into line breaks + See about cross platform cab file generation + +.SYNOPSIS + Updates or creates markdown help files + +.DESCRIPTION + The Update-helpContent script updates or creates markdown help files which are + used by both Github pages and as external help. + + The markdown documents created contain metadata that GitHub pages directly use + to build its entire documentation structure\site. + + This also generates external XML\cab help files. + - 2022-11: More research is needed to fully implement external help + +.PARAMETER moduleName + The name of the module to generate help documents for + + Example: PokeAPI + +.PARAMETER helpDocsPath + Location to store the markdown help docs + + All markdown help docs should be located outside the module folder. + Reference: + Yes - "PokeAPI-PowerShellWrapper\docs" + NO - "PokeAPI-PowerShellWrapper\PokeAPI\docs" + + Example: "C:\Celerium\Projects\PokeAPI-PowerShellWrapper\docs" + +.PARAMETER csvFilePath + Location where the tracking CSV is located including the CSV file name + + The tracking CSV should be located in "PokeAPI-PowerShellWrapper\docs" + Reference: + Yes - "PokeAPI-PowerShellWrapper\docs\Endpoints.csv" + NO - "PokeAPI-PowerShellWrapper\PokeAPI\docs\Endpoints.csv" + + Example: "C:\Celerium\Projects\PokeAPI-PowerShellWrapper\docs\Endpoints.csv" + +.PARAMETER githubPageUri + Base url of the modules github pages + + Example: "https://celerium.github.io/PokeAPI-PowerShellWrapper" + +.PARAMETER ShowHelpDocs + Opens the directory with the HelpDocs when completed + +.EXAMPLE + .\Update-helpContent.ps1 + -moduleName PokeAPI + -helpDocsPath "C:\Celerium\Projects\PokeAPI-PowerShellWrapper\docs" + -csvFilePath "C:\Celerium\Projects\PokeAPI-PowerShellWrapper\docs\Endpoints.csv" + -githubPageUri "https://celerium.github.io/PokeAPI-PowerShellWrapper" + + Updates markdown docs and external help files + + No progress information is sent to the console while the script is running. + +.EXAMPLE + .\Update-helpContent.ps1 + -moduleName PokeAPI + -helpDocsPath "C:\Celerium\Projects\PokeAPI-PowerShellWrapper\docs" + -csvFilePath "C:\Celerium\Projects\PokeAPI-PowerShellWrapper\docs\Endpoints.csv" + -githubPageUri "https://celerium.github.io/PokeAPI-PowerShellWrapper" + -verbose + + Updates markdown docs and external help files + + Progress information is sent to the console while the script is running. + +.INPUTS + N\A + +.OUTPUTS + N\A + +.LINK + https://celerium.org + +#> + +#Region [ Parameters ] + +[CmdletBinding()] +param( + [Parameter(Mandatory=$true, ValueFromPipeline = $true)] + [ValidateNotNullOrEmpty()] + [String]$moduleName, + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$helpDocsPath, + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$csvFilePath, + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$githubPageUri, + + [Parameter(Mandatory=$false)] + [Switch]$ShowHelpDocs + ) + +#EndRegion [ Parameters ] + +Write-Verbose '' +Write-Verbose "START - $(Get-Date -Format yyyy-MM-dd-HH:mm)" +Write-Verbose '' + +Write-Verbose " - (1/3) - $(Get-Date -Format MM-dd-HH:mm) - Configuring prerequisites" + +#Region [ Prerequisites ] + +$startDate = Get-Date + +#trim trailing slashes from urls +if ($helpDocsPath[$helpDocsPath.Length-1] -eq "/" -or $helpDocsPath[$helpDocsPath.Length-1] -eq "\") { + $helpDocsPath = $helpDocsPath.Substring(0,$helpDocsPath.Length-1) +} +if ($githubPageUri[$githubPageUri.Length-1] -eq "/" -or $githubPageUri[$githubPageUri.Length-1] -eq "\") { + $githubPageUri = $githubPageUri.Substring(0,$githubPageUri.Length-1) +} + +$modulePage = Join-Path -Path $helpDocsPath -ChildPath "$moduleName.md" +$tempFolder = Join-Path -Path $helpDocsPath -ChildPath "temp" +$siteStructureFolder= Join-Path -Path $helpDocsPath -ChildPath "site" +$externalHelp = Join-Path -Path $helpDocsPath -ChildPath "en-US" +$externalHelpCab = Join-Path -Path $helpDocsPath -ChildPath "cab" + +$docFolders = $helpDocsPath,$tempFolder,$siteStructureFolder,$externalHelp,$externalHelpCab + +$TemplatePages = 'DELETE.md', 'GET.md', 'index.md', 'POST.md', 'PUT.md' + +Try{ + + if (Get-InstalledModule -Name platyPS -ErrorAction SilentlyContinue -Verbose:$false 4>$null) { + Import-Module -Name platyPS -Verbose:$false + } + else{ + throw "The platyPS module was not found" + } + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\build', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/build', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + $modulePath = Join-Path -Path $rootPath -ChildPath $moduleName + $modulePsd1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + + if (Test-Path -Path $modulePsd1 ){ + Import-Module -Name $modulePsd1 -Force -Verbose:$false + $Commands = Get-Command -Module $moduleName -ErrorAction Stop | Sort-Object Name + } + else{ + throw "The [ $moduleName ] module was not found" + } + + ForEach ($folder in $docFolders){ + + if ( ($folder -ne $helpDocsPath) -and (Test-Path -Path $folder -PathType Container) ){ + Remove-Item -Path $folder -Force -Recurse + New-Item -Path $folder -ItemType Directory > $null + } + else{ + if ( (Test-Path -Path $folder -PathType Container) -eq $false ){ + New-Item -Path $folder -ItemType Directory > $null + } + } + + } + + if ( (Test-Path -Path $csvFilePath -PathType Leaf) -eq $false ){ + throw "The required CSV file was not found at [ $csvFilePath ]" + } + else{ + $CSV = Import-Csv -Path $csvFilePath + } + +} +Catch{ + Write-Error $_ + exit 1 +} + +#EndRegion [ Prerequisites ] + +Write-Verbose " - (2/4) - $(Get-Date -Format MM-dd-HH:mm) - Regenerating module document" + +#Region [ Base module help ] + +New-MarkdownHelp -Module $moduleName -WithModulePage -ModulePagePath $modulePage -OutputFolder $tempFolder -Force > $null + + Update-MarkdownHelpModule -Path $tempFolder -RefreshModulePage -ModulePagePath $modulePage > $null + + Remove-Item -Path $tempFolder -Recurse -Force > $null + +Write-Verbose " - - $(Get-Date -Format MM-dd-HH:mm) - Updating module metadata" + +#will change when external help is figured out +$downloadLink = "$githubPageUri/docs/cab" + + #Add GitHub pages parent + $content = Get-Content -Path $ModulePage + $newContent = $content -replace "Module Name", "parent: Home `nModule Name" + $newContent | Set-Content -Path $modulePage + + #Adjust module download links + $content = Get-Content -Path $ModulePage + $newContent = $content -replace "(?<=Download Help Link:).*", " $DownloadLink" + $newContent | Set-Content -Path $modulePage + + #Adjust module description + $moduleDescription = 'This PowerShell module acts as a wrapper for the Poke API.' + + $content = Get-Content -Path $ModulePage -Raw + [regex]$updateDescription = "{{ Fill in the Description }}" + $newContent = $updateDescription.replace($content, "$moduleDescription", 1) + $newContent | Set-Content -Path $modulePage -NoNewline + +#EndRegion [ Base module help ] + +Write-Verbose " - (3/4) - $(Get-Date -Format MM-dd-HH:mm) - Regenerating [ $( ($Commands | Measure-Object).count) ] help documents" + +#Region [ Organize Markdown ] + +ForEach ( $Cmdlet in $Commands ) { + + #Helps avoid files in use by another process error + Start-Sleep -Milliseconds 250 + + $CsvData = $CSV | Where-Object {$_.Function -like "*$($Cmdlet.Name)*"} + + $Category = $($CsvData.Category | Select-Object -Unique) + if ($null -eq $Category){ + $Category = '_Unique' + } + + $Method = $($CsvData.Method | Select-Object -Unique) + if ($null -eq $Method){ + $Method = 'Special' + Write-Warning " - - $(Get-Date -Format MM-dd-HH:mm) - Unique command found, manually adjust the CSV file & metadata for [ $($Cmdlet.Name) ]" + } + + $CategoryPath = Join-Path -Path $siteStructureFolder -ChildPath $Category + if ( (Test-Path -Path $CategoryPath -PathType Container) -eq $false ){ + New-Item -Path $CategoryPath -ItemType Directory > $null + } + + $onlineVersion = "$githubPageUri/site/$Category/$($Cmdlet.Name).html" + $newMetadata = @{ + 'title' = $($Cmdlet.Name) + 'parent' = $Method + 'grand_parent' = $Category + } + New-MarkdownHelp -Command $Cmdlet -Metadata $newMetadata -OnlineVersionUrl $onlineVersion -OutputFolder $CategoryPath -Force > $null + + #Adjust module uri links + $content = Get-Content -Path $modulePage + $newContent = $content -replace "$($Cmdlet.Name + '.md')","site/$Category/$($Cmdlet.Name + '.md')" + $newContent | Set-Content -Path $modulePage + + #Adjust module powershell code fence + $content = Get-Content -Path $( Join-Path -Path $CategoryPath -ChildPath "$($Cmdlet.Name + '.md')" ) -Raw + $newContent = $content -replace '(?m)(?^```)(?=\r\n\w+)', "`${fence}powershell" + $newContent | Set-Content -Path $( Join-Path -Path $CategoryPath -ChildPath "$($Cmdlet.Name + '.md')" ) -NoNewline + +#Region [ Template Code ] + + ForEach ($Template in $TemplatePages){ + + $template_Path = $(Join-Path -Path $CategoryPath -ChildPath $Template) + + if ($Template -ne 'index.md'){ + $fileContents = @" +--- +title: $( ($Template -replace '.md','').ToUpper()) +parent: xxparentxx +has_children: true +--- +"@ + } + else{ $fileContents = @" +--- +title: xxparentxx +has_children: true +--- + +## xxparentxx - endpoint help & documentation + +{: .highlight } +Some functions will handle more than one endpoint and the numbers below show the total endpoints **not** the total functions + +| **Method** | **Endpoint Count** | +|------------|---------------------| +| DELETE | xdeleteCountx | +| GET | xgetCountx | +| POST | xpostCountx | +| PUT | xputCountx | + +Have a look around and if you would like to contribute please read over the [Contributing guide](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) +"@ + } + + if( $Template -eq 'index.md' ){ + New-Item -Path $template_Path -ItemType File -Value $fileContents -Force > $null + } + else{ + New-Item -Path $( Join-Path -Path $CategoryPath -ChildPath $(($Template -replace '.md','').ToUpper() + '.md') ) -ItemType File -Value $fileContents -Force > $null + } + + #Title and Parents + $content = Get-Content -Path $template_Path + $newContent = $content -replace 'xxparentxx',"$Category" + $newContent | Set-Content -Path $template_Path + + if( $Template -eq 'index.md' ){ + + $Counts = 'xdeleteCountx', 'xgetCountx', 'xpostCountx', 'xputCountx' + ForEach ($Count in $Counts){ + + $content = Get-Content -Path $template_Path + + Switch($Count){ + 'xdeleteCountx' { $countValue = ($CSV | Where-Object {$_.Method -eq 'Delete' -and $_.Category -eq $Category} | Measure-Object).count } + 'xgetCountx' { $countValue = ($CSV | Where-Object {$_.Method -eq 'Get' -and $_.Category -eq $Category} | Measure-Object).count } + 'xpostCountx' { $countValue = ($CSV | Where-Object {$_.Method -eq 'Post' -and $_.Category -eq $Category} | Measure-Object).count } + 'xputCountx' { $countValue = ($CSV | Where-Object {$_.Method -eq 'Put' -and $_.Category -eq $Category} | Measure-Object).count } + } + + $newContent = $content -replace $Count,$countValue + $newContent | Set-Content -Path $template_Path + + } + } + + } + +#EndRegion [ Template Code ] + +} + +#EndRegion [ Organize Markdown ] + +Write-Verbose " - (4/4) - $(Get-Date -Format MM-dd-HH:mm) - Regenerating external help" + +#Region [ External Help ] + +if ($IsWindows -or $PSEdition -eq 'Desktop') { + + $helpFilePaths = [System.Collections.Generic.List[object]]::new() + $helpFiles = (Get-ChildItem -Path $siteStructureFolder -Include "*.md" -Exclude index*,delete*,post*,put*,get.* -Recurse | Sort-Object fullName).fullName + + ForEach ($File in $helpFiles){ + $helpFilePaths.Add($File) > $null + } + + New-ExternalHelp -Path $helpFilePaths -OutputPath $externalHelp -Force > $null + + + New-ExternalHelpCab -CabFilesFolder $externalHelp -LandingPagePath $modulePage -OutputFolder $externalHelpCab -IncrementHelpVersion > $null + +} +else{ + Write-Warning " - - $(Get-Date -Format MM-dd-HH:mm) - [ New-ExternalHelpCab ] MakeCab.exe requirement is not compatible at this time" +} + +#EndRegion [ External Help ] + +if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force -Verbose:$false +} + +#Open File Explorer to show doc output +if ($ShowHelpDocs){ + Invoke-Item $helpDocsPath +} + +Write-Verbose '' +Write-Verbose "END - $(Get-Date -Format yyyy-MM-dd-HH:mm)" +Write-Verbose '' + +$TimeToComplete = New-TimeSpan -Start $startDate -End (Get-Date) +Write-Verbose 'Time to complete' +Write-Verbose ($TimeToComplete | Select-Object * -ExcludeProperty Ticks,Total*,Milli* | Out-String) + +} \ No newline at end of file diff --git a/docs/Contributing.md b/docs/Contributing.md new file mode 100644 index 0000000..a93ab92 --- /dev/null +++ b/docs/Contributing.md @@ -0,0 +1,46 @@ +--- +title: Contributing +parent: Home +nav_order: 3 +--- + +[Source Contributing Guide](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) + +--- + +# How to contribute to this module + +> Please note: As a loose rule any pull requests for general code cleanup will generally be merged when a new version is released. I have a limited number of hours per week to review and test pull requests. I will do my best to test pull requests within a reasonable time frame, but no guarantees can be made. + +## **Did you find a bug?** + +* **Ensure the bug was not already reported** by searching on GitHub under [Issues](https://github.com/Celerium/PokeAPI-PowerShellWrapper/issues). + +* If you're unable to find an open issue addressing the problem, [open a new one](https://github.com/Celerium/PokeAPI-PowerShellWrapper/issues/new/choose). + * Be sure to include a **title and clear description**, as much relevant information as possible, and a **code sample** or an **executable test case** demonstrating the expected behavior that is not occurring. + +## **Did you write a patch that fixes a bug?** + +* [ ] Submit a pull request to the **dev** branch +* [ ] Ensure the pull request description clearly describes the problem and solution. + +If the feature is accepted and I have time to test, the pull request will be approved. + +## **Do you intend to add a new feature or change an existing one?** + +* Suggest your change by creating a GitHub issue tagged with "Enhancement" + +* Create a branch and start working on your new feature, following feedback from the community. + +* Once the new feature is ready, + + * [ ] Update any documentation if needed + * [ ] Submit a pulling request to the **development** branch + +If the feature is accepted and I have time to test, the pull request will be approved. + +Thanks! :heart: + +--- + +> Based off of the Ruby on Rails project [contribution guide](https://github.com/rails/rails/blob/master/CONTRIBUTING.md). diff --git a/docs/Endpoints.csv b/docs/Endpoints.csv new file mode 100644 index 0000000..54a7a48 --- /dev/null +++ b/docs/Endpoints.csv @@ -0,0 +1,109 @@ +Category,EndpointUri,Method,Function,Complete,Notes +berry,/berry/,GET,Get-PokeBerry,YES, +berry,/berry/{id or name}/,GET,Get-PokeBerry,YES, +berry,/berry-firmness,GET,Get-PokeBerryFirmness,YES, +berry,/berry-firmness/{id or name}/,GET,Get-PokeBerryFirmness,YES, +berry,/berry-flavor/,GET,Get-PokeBerryFlavor,YES, +berry,/berry-flavor/{id or name}/,GET,Get-PokeBerryFlavor,YES, +contest,/contest-type/,GET,Get-PokeContestType,YES, +contest,/contest-type/{id or name}/,GET,Get-PokeContestType,YES, +contest,/contest-effect/,GET,Get-PokeContestEffect,YES, +contest,/contest-effect/{id}/,GET,Get-PokeContestEffect,YES, +contest,/super-contest-effect/,GET,Get-PokeContestSuperEffect,YES, +contest,/super-contest-effect/{id}/,GET,Get-PokeContestSuperEffect,YES, +encounter,/encounter-method/,GET,Get-PokeEncounterMethod,YES, +encounter,/encounter-method/{id or name}/,GET,Get-PokeEncounterMethod,YES, +encounter,/encounter-condition/,GET,Get-PokeEncounterCondition,YES, +encounter,/encounter-condition/{id or name}/,GET,Get-PokeEncounterCondition,YES, +encounter,/encounter-condition-value/{id or name}/,GET,Get-PokeEncounterConditionValue,YES, +encounter,/encounter-condition-value/{id or name}/,GET,Get-PokeEncounterConditionValue,YES, +evolution,/evolution-chain/,GET,Get-PokeEvolutionChain,YES, +evolution,/evolution-chain/{id}/,GET,Get-PokeEvolutionChain,YES, +evolution,/evolution-trigger/,GET,Get-PokeEvolutionTrigger,YES, +evolution,/evolution-trigger/{id or name}/,GET,Get-PokeEvolutionTrigger,YES, +game,/generation/,GET,Get-PokeGameGeneration,YES, +game,/generation/{id or name}/,GET,Get-PokeGameGeneration,YES, +game,/pokedex/,GET,Get-PokeGamePokedex,YES, +game,/pokedex/{id or name}/,GET,Get-PokeGamePokedex,YES, +game,/version/,GET,Get-PokeGameVersion,YES, +game,/version/{id or name}/,GET,Get-PokeGameVersion,YES, +game,/version-group/,GET,Get-PokeGameVersionGroup,YES, +game,/version-group/{id or name}/,GET,Get-PokeGameVersionGroup,YES, +Internal,,POST,Add-PokeBaseURI,YES, +Internal,,PUT,ConvertTo-PokeQueryString,YES, +Internal,,GET,Export-PokeModuleSettings,YES, +Internal,,GET,Get-PokeBaseURI,YES, +Internal,,GET,Get-PokeMetaData,YES, +Internal,,GET,Get-PokeModuleSettings,YES, +Internal,,SET,Import-PokeModuleSettings,YES, +Internal,,GET,Invoke-PokeRequest,YES, +Internal,,DELETE,Remove-PokeBaseURI,YES, +Internal,,DELETE,Remove-PokeModuleSettings,YES, +item,/item/,GET,Get-PokeItem,YES, +item,/item/{id or name}/,GET,Get-PokeItem,YES, +item,/item-attribute/,GET,Get-PokeItemAttribute,YES, +item,/item-attribute/{id or name}/,GET,Get-PokeItemAttribute,YES, +item,/item-category/,GET,Get-PokeItemCategory,YES, +item,/item-category/{id or name}/,GET,Get-PokeItemCategory,YES, +item,/item-fling-effect/,GET,Get-PokeItemFlingEffect,YES, +item,/item-fling-effect/{id or name}/,GET,Get-PokeItemFlingEffect,YES, +item,/item-pocket/,GET,Get-PokeItemPocket,YES, +item,/item-pocket/{id or name}/,GET,Get-PokeItemPocket,YES, +location,/location/,GET,Get-PokeLocation,YES, +location,/location/{id or name}/,GET,Get-PokeLocation,YES, +location,/location-area/,GET,Get-PokeLocationArea,YES, +location,/location-area/{id or name}/,GET,Get-PokeLocationArea,YES, +location,/pal-park-area/,GET,Get-PokeLocationPalParkArea,YES, +location,/pal-park-area/{id or name}/,GET,Get-PokeLocationPalParkArea,YES, +location,/region/,GET,Get-PokeLocationRegion,YES, +location,/region/{id or name}/,GET,Get-PokeLocationRegion,YES, +machine,/machine/,GET,Get-PokeMachine,YES, +machine,/machine/{id}/,GET,Get-PokeMachine,YES, +move,/move/,GET,Get-PokeMove,YES, +move,/move/{id or name}/,GET,Get-PokeMove,YES, +move,/move-ailment/,GET,Get-PokeMoveAilment,YES, +move,/move-ailment/{id or name}/,GET,Get-PokeMoveAilment,YES, +move,/move-battle-style/,GET,Get-PokeMoveBattleStyle,YES, +move,/move-battle-style/{id or name}/,GET,Get-PokeMoveBattleStyle,YES, +move,/move-category/,GET,Get-PokeMoveCategory,YES, +move,/move-category/{id or name}/,GET,Get-PokeMoveCategory,YES, +move,/move-damage-class/,GET,Get-PokeMoveDamageClass,YES, +move,/move-damage-class/{id or name}/,GET,Get-PokeMoveDamageClass,YES, +move,/move-learn-method/,GET,Get-PokeMoveLearnMethod,YES, +move,/move-learn-method/{id or name}/,GET,Get-PokeMoveLearnMethod,YES, +move,/move-target/,GET,Get-PokeMoveTarget,YES, +move,/move-target/{id or name}/,GET,Get-PokeMoveTarget,YES, +pokemon,/ability/,GET,Get-PokePokemonAbility,Yes, +pokemon,/ability/{id or name}/,GET,Get-PokePokemonAbility,Yes, +pokemon,/characteristic/,GET,Get-PokePokemonCharacteristic,Yes, +pokemon,/characteristic/{id}/,GET,Get-PokePokemonCharacteristic,Yes, +pokemon,/egg-group/,GET,Get-PokePokemonEggGroup,Yes, +pokemon,/egg-group/{id or name}/,GET,Get-PokePokemonEggGroup,Yes, +pokemon,/gender/,GET,Get-PokePokemonGender,Yes, +pokemon,/gender/{id or name}/,GET,Get-PokePokemonGender,Yes, +pokemon,/growth-rate/,GET,Get-PokePokemonGrowthRate,Yes, +pokemon,/growth-rate/{id or name}/,GET,Get-PokePokemonGrowthRate,Yes, +pokemon,/nature/,GET,Get-PokePokemonNature,Yes, +pokemon,/nature/{id or name}/,GET,Get-PokePokemonNature,Yes, +pokemon,/pokeathlon-stat/,GET,Get-PokePokemonPokeathlonStat,Yes, +pokemon,/pokeathlon-stat/{id or name}/,GET,Get-PokePokemonPokeathlonStat,Yes, +pokemon,/pokemon/,GET,Get-PokePokemon,Yes, +pokemon,/pokemon/{id or name}/,GET,Get-PokePokemon,Yes, +pokemon,/pokemon/{id or name}/encounters,GET,Get-PokePokemonEncounter,Yes, +pokemon,/pokemon-color/,GET,Get-PokePokemonColor,Yes, +pokemon,/pokemon-color/{id or name}/,GET,Get-PokePokemonColor,Yes, +pokemon,/pokemon-form/,GET,Get-PokePokemonForm,Yes, +pokemon,/pokemon-form/{id or name}/,GET,Get-PokePokemonForm,Yes, +pokemon,/pokemon-habitat/,GET,Get-PokePokemonHabitat,Yes, +pokemon,/pokemon-habitat/{id or name}/,GET,Get-PokePokemonHabitat,Yes, +pokemon,/pokemon-shape/,GET,Get-PokePokemonShape,Yes, +pokemon,/pokemon-shape/{id or name}/,GET,Get-PokePokemonShape,Yes, +pokemon,/pokemon-species/,GET,Get-PokePokemonSpecies,Yes, +pokemon,/pokemon-species/{id or name}/,GET,Get-PokePokemonSpecies,Yes, +pokemon,/stat/,GET,Get-PokePokemonStat,Yes, +pokemon,/stat/{id or name}/,GET,Get-PokePokemonStat,Yes, +pokemon,/type/,GET,Get-PokePokemonType,Yes, +pokemon,/type/{id or name}/,GET,Get-PokePokemonType,Yes, +utility,/language/,GET,Get-PokeLanguage,Yes, +utility,/language/{id or name}/,GET,Get-PokeLanguage,Yes, +utility,/,GET,Get-PokeEndpoint,Yes, diff --git a/docs/PokeAPI.md b/docs/PokeAPI.md new file mode 100644 index 0000000..ad75fdb --- /dev/null +++ b/docs/PokeAPI.md @@ -0,0 +1,192 @@ +--- +parent: Home +Module Name: PokeAPI +Module Guid: d6c6b73e-d0ad-4d09-8a24-a5a05064d26c +Download Help Link: https://celerium.github.io/PokeAPI-PowerShellWrapper/docs/cab +Help Version: 1.0.0.0 +Locale: en-US +--- + +# PokeAPI Module +## Description +This PowerShell module acts as a wrapper for the Poke API. + +## PokeAPI Cmdlets +### [Add-PokeBaseURI](site/Internal/Add-PokeBaseURI.md) +Sets the base URI for the Poke API connection. + +### [ConvertTo-PokeQueryString](site/Internal/ConvertTo-PokeQueryString.md) +Converts uri filter parameters + +### [Export-PokeModuleSettings](site/Internal/Export-PokeModuleSettings.md) +Exports the Poke BaseURI, API, & JSON configuration information to file. + +### [Get-PokeBaseURI](site/Internal/Get-PokeBaseURI.md) +Shows the Poke base URI global variable. + +### [Get-PokeBerry](site/berry/Get-PokeBerry.md) +Gets pokemon forms from PokeAPI + +### [Get-PokeBerryFirmness](site/berry/Get-PokeBerryFirmness.md) +Gets the firmness of berries from PokeAPI + +### [Get-PokeBerryFlavor](site/berry/Get-PokeBerryFlavor.md) +Gets berry flavor from PokeAPI + +### [Get-PokeContestEffect](site/contest/Get-PokeContestEffect.md) +Gets contest effects from PokeAPI + +### [Get-PokeContestSuperEffect](site/contest/Get-PokeContestSuperEffect.md) +Gets super contest effects from PokeAPI + +### [Get-PokeContestType](site/contest/Get-PokeContestType.md) +Gets contest types from PokeAPI + +### [Get-PokeEncounterCondition](site/encounter/Get-PokeEncounterCondition.md) +Gets encounter conditions from PokeAPI + +### [Get-PokeEncounterConditionValue](site/encounter/Get-PokeEncounterConditionValue.md) +Gets encounter condition values from PokeAPI + +### [Get-PokeEncounterMethod](site/encounter/Get-PokeEncounterMethod.md) +Gets encounter methods from PokeAPI + +### [Get-PokeEndpoint](site/utility/Get-PokeEndpoint.md) +Gets endpoints from PokeAPI + +### [Get-PokeEvolutionChain](site/evolution/Get-PokeEvolutionChain.md) +Gets evolution chains from PokeAPI + +### [Get-PokeEvolutionTrigger](site/evolution/Get-PokeEvolutionTrigger.md) +Gets evolution triggers from PokeAPI + +### [Get-PokeGameGeneration](site/game/Get-PokeGameGeneration.md) +Gets game generations from PokeAPI + +### [Get-PokeGamePokedex](site/game/Get-PokeGamePokedex.md) +Gets game pokedexes from PokeAPI + +### [Get-PokeGameVersion](site/game/Get-PokeGameVersion.md) +Gets game versions from PokeAPI + +### [Get-PokeGameVersionGroup](site/game/Get-PokeGameVersionGroup.md) +Gets game version groups from PokeAPI + +### [Get-PokeItem](site/item/Get-PokeItem.md) +Gets items from PokeAPI + +### [Get-PokeItemAttribute](site/item/Get-PokeItemAttribute.md) +Gets item attributes from PokeAPI + +### [Get-PokeItemCategory](site/item/Get-PokeItemCategory.md) +Gets item categories from PokeAPI + +### [Get-PokeItemFlingEffect](site/item/Get-PokeItemFlingEffect.md) +Gets item fling effects from PokeAPI + +### [Get-PokeItemPocket](site/item/Get-PokeItemPocket.md) +Gets item pockets from PokeAPI + +### [Get-PokeLanguage](site/utility/Get-PokeLanguage.md) +Gets languages from PokeAPI + +### [Get-PokeLocation](site/location/Get-PokeLocation.md) +Gets locations from PokeAPI + +### [Get-PokeLocationArea](site/location/Get-PokeLocationArea.md) +Gets location areas from PokeAPI + +### [Get-PokeLocationPalParkArea](site/location/Get-PokeLocationPalParkArea.md) +Gets pal park areas from PokeAPI + +### [Get-PokeLocationRegion](site/location/Get-PokeLocationRegion.md) +Gets regions from PokeAPI + +### [Get-PokeMachine](site/machine/Get-PokeMachine.md) +Gets machines from PokeAPI + +### [Get-PokeMetaData](site/Internal/Get-PokeMetaData.md) +Gets various Api metadata values + +### [Get-PokeModuleSettings](site/Internal/Get-PokeModuleSettings.md) +Gets the saved Poke configuration settings + +### [Get-PokeMove](site/move/Get-PokeMove.md) +Gets moves from PokeAPI + +### [Get-PokeMoveAilment](site/move/Get-PokeMoveAilment.md) +Gets move ailments from PokeAPI + +### [Get-PokeMoveBattleStyle](site/move/Get-PokeMoveBattleStyle.md) +Gets move battle styles from PokeAPI + +### [Get-PokeMoveCategory](site/move/Get-PokeMoveCategory.md) +Gets move categories from PokeAPI + +### [Get-PokeMoveDamageClass](site/move/Get-PokeMoveDamageClass.md) +Gets move damage classes from PokeAPI + +### [Get-PokeMoveLearnMethod](site/move/Get-PokeMoveLearnMethod.md) +Gets move learn methods from PokeAPI + +### [Get-PokeMoveTarget](site/move/Get-PokeMoveTarget.md) +Gets move targets from PokeAPI + +### [Get-PokePokemon](site/pokemon/Get-PokePokemon.md) +Gets Pokemon from PokeAPI + +### [Get-PokePokemonAbility](site/pokemon/Get-PokePokemonAbility.md) +Gets Pokemon abilities from PokeAPI + +### [Get-PokePokemonCharacteristic](site/pokemon/Get-PokePokemonCharacteristic.md) +Gets Pokemon characteristics from PokeAPI + +### [Get-PokePokemonColor](site/pokemon/Get-PokePokemonColor.md) +Gets pokemon colors from PokeAPI + +### [Get-PokePokemonEggGroup](site/pokemon/Get-PokePokemonEggGroup.md) +Gets egg groups from PokeAPI + +### [Get-PokePokemonEncounter](site/pokemon/Get-PokePokemonEncounter.md) +Gets pokemon location areas from PokeAPI + +### [Get-PokePokemonGender](site/pokemon/Get-PokePokemonGender.md) +Gets genders from PokeAPI + +### [Get-PokePokemonGrowthRate](site/pokemon/Get-PokePokemonGrowthRate.md) +Gets growth rates from PokeAPI + +### [Get-PokePokemonHabitat](site/pokemon/Get-PokePokemonHabitat.md) +Gets pokemon habitats from PokeAPI + +### [Get-PokePokemonNature](site/pokemon/Get-PokePokemonNature.md) +Gets natures from PokeAPI + +### [Get-PokePokemonPokeathlonStat](site/pokemon/Get-PokePokemonPokeathlonStat.md) +Gets pokeathlon stats from PokeAPI + +### [Get-PokePokemonShape](site/pokemon/Get-PokePokemonShape.md) +Gets pokemon shapes from PokeAPI + +### [Get-PokePokemonSpecies](site/pokemon/Get-PokePokemonSpecies.md) +Gets pokemon species from PokeAPI + +### [Get-PokePokemonStat](site/pokemon/Get-PokePokemonStat.md) +Gets pokemon stats from PokeAPI + +### [Get-PokePokemonType](site/pokemon/Get-PokePokemonType.md) +Gets pokemon move type properties from PokeAPI + +### [Import-PokeModuleSettings](site/Internal/Import-PokeModuleSettings.md) +Imports the Poke BaseURI information to the current session. + +### [Invoke-PokeRequest](site/Internal/Invoke-PokeRequest.md) +Makes an API request + +### [Remove-PokeBaseURI](site/Internal/Remove-PokeBaseURI.md) +Removes the Poke base URI global variable. + +### [Remove-PokeModuleSettings](site/Internal/Remove-PokeModuleSettings.md) +Removes the stored Poke configuration folder. + + diff --git a/docs/TrackingCSV.md b/docs/TrackingCSV.md new file mode 100644 index 0000000..08e0108 --- /dev/null +++ b/docs/TrackingCSV.md @@ -0,0 +1,129 @@ +--- +title: Tracking CSV +parent: Home +nav_order: 2 +--- + +# Tracking CSV + +When updating the documentation for this project, the tracking CSV plays a huge part in organizing of the markdown documents. Any new functions or endpoints should be added to the tracking CSV when publishing an updated module or documentation version. + +{: .warning } +I recommend downloading the CSV from the link provided rather then viewing the table below. + +[Tracking CSV](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/docs/Endpoints.csv) + +--- + +## CSV markdown table + +|Category |EndpointUri |Method|Function |Complete|Notes| +|---------|----------------------------------------|------|-------------------------------|--------|-----| +|berry |/berry/ |GET |Get-PokeBerry |YES | | +|berry |/berry/{id or name}/ |GET |Get-PokeBerry |YES | | +|berry |/berry-firmness |GET |Get-PokeBerryFirmness |YES | | +|berry |/berry-firmness/{id or name}/ |GET |Get-PokeBerryFirmness |YES | | +|berry |/berry-flavor/ |GET |Get-PokeBerryFlavor |YES | | +|berry |/berry-flavor/{id or name}/ |GET |Get-PokeBerryFlavor |YES | | +|contest |/contest-type/ |GET |Get-PokeContestType |YES | | +|contest |/contest-type/{id or name}/ |GET |Get-PokeContestType |YES | | +|contest |/contest-effect/ |GET |Get-PokeContestEffect |YES | | +|contest |/contest-effect/{id}/ |GET |Get-PokeContestEffect |YES | | +|contest |/super-contest-effect/ |GET |Get-PokeContestSuperEffect |YES | | +|contest |/super-contest-effect/{id}/ |GET |Get-PokeContestSuperEffect |YES | | +|encounter|/encounter-method/ |GET |Get-PokeEncounterMethod |YES | | +|encounter|/encounter-method/{id or name}/ |GET |Get-PokeEncounterMethod |YES | | +|encounter|/encounter-condition/ |GET |Get-PokeEncounterCondition |YES | | +|encounter|/encounter-condition/{id or name}/ |GET |Get-PokeEncounterCondition |YES | | +|encounter|/encounter-condition-value/{id or name}/|GET |Get-PokeEncounterConditionValue|YES | | +|encounter|/encounter-condition-value/{id or name}/|GET |Get-PokeEncounterConditionValue|YES | | +|evolution|/evolution-chain/ |GET |Get-PokeEvolutionChain |YES | | +|evolution|/evolution-chain/{id}/ |GET |Get-PokeEvolutionChain |YES | | +|evolution|/evolution-trigger/ |GET |Get-PokeEvolutionTrigger |YES | | +|evolution|/evolution-trigger/{id or name}/ |GET |Get-PokeEvolutionTrigger |YES | | +|game |/generation/ |GET |Get-PokeGameGeneration |YES | | +|game |/generation/{id or name}/ |GET |Get-PokeGameGeneration |YES | | +|game |/pokedex/ |GET |Get-PokeGamePokedex |YES | | +|game |/pokedex/{id or name}/ |GET |Get-PokeGamePokedex |YES | | +|game |/version/ |GET |Get-PokeGameVersion |YES | | +|game |/version/{id or name}/ |GET |Get-PokeGameVersion |YES | | +|game |/version-group/ |GET |Get-PokeGameVersionGroup |YES | | +|game |/version-group/{id or name}/ |GET |Get-PokeGameVersionGroup |YES | | +|Internal | |POST |Add-PokeBaseURI |YES | | +|Internal | |PUT |ConvertTo-PokeQueryString |YES | | +|Internal | |GET |Export-PokeModuleSettings |YES | | +|Internal | |GET |Get-PokeBaseURI |YES | | +|Internal | |GET |Get-PokeMetaData |YES | | +|Internal | |GET |Get-PokeModuleSettings |YES | | +|Internal | |SET |Import-PokeModuleSettings |YES | | +|Internal | |GET |Invoke-PokeRequest |YES | | +|Internal | |DELETE|Remove-PokeBaseURI |YES | | +|Internal | |DELETE|Remove-PokeModuleSettings |YES | | +|item |/item/ |GET |Get-PokeItem |YES | | +|item |/item/{id or name}/ |GET |Get-PokeItem |YES | | +|item |/item-attribute/ |GET |Get-PokeItemAttribute |YES | | +|item |/item-attribute/{id or name}/ |GET |Get-PokeItemAttribute |YES | | +|item |/item-category/ |GET |Get-PokeItemCategory |YES | | +|item |/item-category/{id or name}/ |GET |Get-PokeItemCategory |YES | | +|item |/item-fling-effect/ |GET |Get-PokeItemFlingEffect |YES | | +|item |/item-fling-effect/{id or name}/ |GET |Get-PokeItemFlingEffect |YES | | +|item |/item-pocket/ |GET |Get-PokeItemPocket |YES | | +|item |/item-pocket/{id or name}/ |GET |Get-PokeItemPocket |YES | | +|location |/location/ |GET |Get-PokeLocation |YES | | +|location |/location/{id or name}/ |GET |Get-PokeLocation |YES | | +|location |/location-area/ |GET |Get-PokeLocationArea |YES | | +|location |/location-area/{id or name}/ |GET |Get-PokeLocationArea |YES | | +|location |/pal-park-area/ |GET |Get-PokeLocationPalParkArea |YES | | +|location |/pal-park-area/{id or name}/ |GET |Get-PokeLocationPalParkArea |YES | | +|location |/region/ |GET |Get-PokeLocationRegion |YES | | +|location |/region/{id or name}/ |GET |Get-PokeLocationRegion |YES | | +|machine |/machine/ |GET |Get-PokeMachine |YES | | +|machine |/machine/{id}/ |GET |Get-PokeMachine |YES | | +|move |/move/ |GET |Get-PokeMove |YES | | +|move |/move/{id or name}/ |GET |Get-PokeMove |YES | | +|move |/move-ailment/ |GET |Get-PokeMoveAilment |YES | | +|move |/move-ailment/{id or name}/ |GET |Get-PokeMoveAilment |YES | | +|move |/move-battle-style/ |GET |Get-PokeMoveBattleStyle |YES | | +|move |/move-battle-style/{id or name}/ |GET |Get-PokeMoveBattleStyle |YES | | +|move |/move-category/ |GET |Get-PokeMoveCategory |YES | | +|move |/move-category/{id or name}/ |GET |Get-PokeMoveCategory |YES | | +|move |/move-damage-class/ |GET |Get-PokeMoveDamageClass |YES | | +|move |/move-damage-class/{id or name}/ |GET |Get-PokeMoveDamageClass |YES | | +|move |/move-learn-method/ |GET |Get-PokeMoveLearnMethod |YES | | +|move |/move-learn-method/{id or name}/ |GET |Get-PokeMoveLearnMethod |YES | | +|move |/move-target/ |GET |Get-PokeMoveTarget |YES | | +|move |/move-target/{id or name}/ |GET |Get-PokeMoveTarget |YES | | +|pokemon |/ability/ |GET |Get-PokePokemonAbility |Yes | | +|pokemon |/ability/{id or name}/ |GET |Get-PokePokemonAbility |Yes | | +|pokemon |/characteristic/ |GET |Get-PokePokemonCharacteristic |Yes | | +|pokemon |/characteristic/{id}/ |GET |Get-PokePokemonCharacteristic |Yes | | +|pokemon |/egg-group/ |GET |Get-PokePokemonEggGroup |Yes | | +|pokemon |/egg-group/{id or name}/ |GET |Get-PokePokemonEggGroup |Yes | | +|pokemon |/gender/ |GET |Get-PokePokemonGender |Yes | | +|pokemon |/gender/{id or name}/ |GET |Get-PokePokemonGender |Yes | | +|pokemon |/growth-rate/ |GET |Get-PokePokemonGrowthRate |Yes | | +|pokemon |/growth-rate/{id or name}/ |GET |Get-PokePokemonGrowthRate |Yes | | +|pokemon |/nature/ |GET |Get-PokePokemonNature |Yes | | +|pokemon |/nature/{id or name}/ |GET |Get-PokePokemonNature |Yes | | +|pokemon |/pokeathlon-stat/ |GET |Get-PokePokemonPokeathlonStat |Yes | | +|pokemon |/pokeathlon-stat/{id or name}/ |GET |Get-PokePokemonPokeathlonStat |Yes | | +|pokemon |/pokemon/ |GET |Get-PokePokemon |Yes | | +|pokemon |/pokemon/{id or name}/ |GET |Get-PokePokemon |Yes | | +|pokemon |/pokemon/{id or name}/encounters |GET |Get-PokePokemonEncounter |Yes | | +|pokemon |/pokemon-color/ |GET |Get-PokePokemonColor |Yes | | +|pokemon |/pokemon-color/{id or name}/ |GET |Get-PokePokemonColor |Yes | | +|pokemon |/pokemon-form/ |GET |Get-PokePokemonForm |Yes | | +|pokemon |/pokemon-form/{id or name}/ |GET |Get-PokePokemonForm |Yes | | +|pokemon |/pokemon-habitat/ |GET |Get-PokePokemonHabitat |Yes | | +|pokemon |/pokemon-habitat/{id or name}/ |GET |Get-PokePokemonHabitat |Yes | | +|pokemon |/pokemon-shape/ |GET |Get-PokePokemonShape |Yes | | +|pokemon |/pokemon-shape/{id or name}/ |GET |Get-PokePokemonShape |Yes | | +|pokemon |/pokemon-species/ |GET |Get-PokePokemonSpecies |Yes | | +|pokemon |/pokemon-species/{id or name}/ |GET |Get-PokePokemonSpecies |Yes | | +|pokemon |/stat/ |GET |Get-PokePokemonStat |Yes | | +|pokemon |/stat/{id or name}/ |GET |Get-PokePokemonStat |Yes | | +|pokemon |/type/ |GET |Get-PokePokemonType |Yes | | +|pokemon |/type/{id or name}/ |GET |Get-PokePokemonType |Yes | | +|utility |/language/ |GET |Get-PokeLanguage |Yes | | +|utility |/language/{id or name}/ |GET |Get-PokeLanguage |Yes | | +|utility |/ |GET |Get-PokeEndpoint |Yes | | diff --git a/docs/_config.yml b/docs/_config.yml new file mode 100644 index 0000000..73be382 --- /dev/null +++ b/docs/_config.yml @@ -0,0 +1,80 @@ +############ +# Info # +############ + +# David Schulte (Celerium) +# https://celerium.org + +############ +# Main # +############ + +title: PokeAPI +description: Online documentation for the PokeAPI PowerShell wrapper +remote_theme: just-the-docs/just-the-docs +color_scheme: dark + +# Set a path/url to a logo that will be displayed instead of the title +#logo: "https://celerium.org/wp-content/uploads/2021/04/Unicorn-01-LargeTall-Clear2.png" + +# Aux links for the upper right navigation +aux_links_new_tab: true +aux_links: + "Celerium": + - "https://celerium.org/" + "GitHub": + - "https://github.com/Celerium/PokeAPI-PowerShellWrapper" + "Support": + - "https://www.buymeacoffee.com/Celerium" + + +############ +# Body # +############ + +#Exclude directories +#exclude: +# - cab/ +# - en-US/ + +# External navigation links +nav_external_links: + - title: PokeAPI on GitHub + url: https://github.com/Celerium/PokeAPI-PowerShellWrapper + +# Call outs (Notes,Warning..etc) +callouts_level: loud #quiet # or loud +callouts: + highlight: + color: yellow + important: + title: Important + color: blue + new: + title: New + color: green + note: + title: Note + color: purple + warning: + title: Warning + color: red + +############ +# Footer # +############ + +# Back to top link +back_to_top: true +back_to_top_text: "Back to top" + +# Copyright +footer_content: "Copyright © 2020-2023 David Schulte (Celerium). Distributed by an MIT license." + +# Footer "Edit this page on GitHub" link text +gh_edit_link: true +gh_edit_link_text: "Edit this page on GitHub" +gh_edit_repository: "https://github.com/Celerium/PokeAPI-PowerShellWrapper" +gh_edit_branch: "main" +gh_edit_source: docs +gh_edit_view_mode: "blob" # "tree" or "edit" if you want the user to jump into the editor immediately diff --git a/docs/cab/PokeAPI_d6c6b73e-d0ad-4d09-8a24-a5a05064d26c_HelpInfo.xml b/docs/cab/PokeAPI_d6c6b73e-d0ad-4d09-8a24-a5a05064d26c_HelpInfo.xml new file mode 100644 index 0000000..3c1dd40 --- /dev/null +++ b/docs/cab/PokeAPI_d6c6b73e-d0ad-4d09-8a24-a5a05064d26c_HelpInfo.xml @@ -0,0 +1,10 @@ + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/docs/cab + + + en-US + 1.0.0.0 + + + \ No newline at end of file diff --git a/docs/cab/PokeAPI_d6c6b73e-d0ad-4d09-8a24-a5a05064d26c_en-US_HelpContent.cab b/docs/cab/PokeAPI_d6c6b73e-d0ad-4d09-8a24-a5a05064d26c_en-US_HelpContent.cab new file mode 100644 index 0000000..929e9b5 Binary files /dev/null and b/docs/cab/PokeAPI_d6c6b73e-d0ad-4d09-8a24-a5a05064d26c_en-US_HelpContent.cab differ diff --git a/docs/cab/PokeAPI_d6c6b73e-d0ad-4d09-8a24-a5a05064d26c_en-US_HelpContent.zip b/docs/cab/PokeAPI_d6c6b73e-d0ad-4d09-8a24-a5a05064d26c_en-US_HelpContent.zip new file mode 100644 index 0000000..6a418e2 Binary files /dev/null and b/docs/cab/PokeAPI_d6c6b73e-d0ad-4d09-8a24-a5a05064d26c_en-US_HelpContent.zip differ diff --git a/docs/en-US/PokeAPI-help.xml b/docs/en-US/PokeAPI-help.xml new file mode 100644 index 0000000..7f26fcc --- /dev/null +++ b/docs/en-US/PokeAPI-help.xml @@ -0,0 +1,10348 @@ + + + + + Set-PokeBaseURI + Set + PokeBaseURI + + Sets the base URI for the Poke API connection. + + + + The Add-PokeBaseURI cmdlet sets the base URI which is later used to construct the full URI for all API calls. + + + + Set-PokeBaseURI + + + + + + + + N\A + + + + + -------------------------- EXAMPLE 1 -------------------------- + Add-PokeBaseURI + + The base URI will use https://pokeapi.co/api/v2/ which is Poke's default URI. + + + + -------------------------- EXAMPLE 2 -------------------------- + Add-PokeBaseURI -base_uri http://myapi.gateway.example.com + + A custom API gateway of http://myapi.gateway.example.com will be used for all API calls to Poke's API. + + + + + + Online Version: + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/_Unique/Set-PokeBaseURI.html + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Add-PokeBaseURI.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Add-PokeBaseURI.html + + + + + + Get-PokeBerry + Get + PokeBerry + + Gets pokemon forms from PokeAPI + + + + The Get-PokeBerry cmdlet gets pokemon forms from PokeAPI + Some Pokemon may appear in one of multiple, visually different forms. These differences are purely cosmetic. For variations within a Pokemon species, which do differ in more than just visuals, the 'Pokemon' entity is used to represent such a variety. + + + + Get-PokeBerry + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeBerry + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeBerry + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeBerry + + Gets the first 20 pokemon forms sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeBerry -id 1 + + Gets the pokemon form with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeBerry -name ditto + + Gets the pokemon form with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeBerry -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + Online Version: + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerry.html + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokeBerry.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokeBerry.html + + + + + + Get-PokeBerryFirmness + Get + PokeBerryFirmness + + Gets the firmness of berries from PokeAPI + + + + The Get-PokeBerryFirmness cmdlet gets the firmness of berries from PokeAPI + Berries can be soft or hard + + + + Get-PokeBerryFirmness + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeBerryFirmness + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeBerryFirmness + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeBerryFirmness + + Gets the first 20 berry firmness sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeBerryFirmness -id 1 + + Gets the berry firmness with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeBerryFirmness -name ditto + + Gets the berry firmness with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeBerryFirmness -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerryFirmness.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerryFirmness.html + + + + + + Get-PokeBerryFlavor + Get + PokeBerryFlavor + + Gets berry flavor from PokeAPI + + + + The Get-PokeBerryFlavor cmdlet gets berry flavor from PokeAPI + Flavors determine whether a Pokemon will benefit or suffer from eating a berry based on their nature + + + + Get-PokeBerryFlavor + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeBerryFlavor + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeBerryFlavor + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeBerryFlavor + + Gets the first 20 berry flavors sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeBerryFlavor -id 1 + + Gets the berry flavor with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeBerryFlavor -name ditto + + Gets the berry flavor with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeBerryFlavor -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerryFlavor.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerryFlavor.html + + + + + + Get-PokeContestEffect + Get + PokeContestEffect + + Gets contest effects from PokeAPI + + + + The Get-PokeContestEffect cmdlet gets contest effects from PokeAPI + Contest effects refer to the effects of moves when used in contests + + + + Get-PokeContestEffect + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeContestEffect + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeContestEffect + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeContestEffect + + Gets the first 20 contest effects sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeContestEffect -id 1 + + Gets the contest effect with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeContestEffect -name ditto + + Gets the contest effect with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeContestEffect -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestEffect.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestEffect.html + + + + + + Get-PokeContestSuperEffect + Get + PokeContestSuperEffect + + Gets super contest effects from PokeAPI + + + + The Get-PokeContestSuperEffect cmdlet gets super contest effects from PokeAPI + Super contest effects refer to the effects of moves when used in super contests + + + + Get-PokeContestSuperEffect + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeContestSuperEffect + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeContestSuperEffect + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeContestSuperEffect + + Gets the first 20 super contest effects sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeContestSuperEffect -id 1 + + Gets the super contest effect with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeContestSuperEffect -name ditto + + Gets the super contest effect with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeContestSuperEffect -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestSuperEffect.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestSuperEffect.html + + + + + + Get-PokeContestType + Get + PokeContestType + + Gets contest types from PokeAPI + + + + The Get-PokeContestType cmdlet gets contest types from PokeAPI + Contest types are categories judges used to weigh a Pokemon's condition in Pokemon contests. + + + + Get-PokeContestType + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeContestType + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeContestType + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeContestType + + Gets the first 20 contest types sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeContestType -id 1 + + Gets the contest type with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeContestType -name ditto + + Gets the contest type with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeContestType -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestType.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestType.html + + + + + + Get-PokeEncounterCondition + Get + PokeEncounterCondition + + Gets encounter conditions from PokeAPI + + + + The Get-PokeEncounterCondition cmdlet gets encounter conditions from PokeAPI + Conditions which affect what pokemon might appear in the wild, e.g., day or night. + + + + Get-PokeEncounterCondition + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeEncounterCondition + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeEncounterCondition + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeEncounterCondition + + Gets the first 20 encounter conditions sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeEncounterCondition -id 1 + + Gets the encounter condition with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeEncounterCondition -name ditto + + Gets the encounter condition with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeEncounterCondition -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterCondition.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterCondition.html + + + + + + Get-PokeEncounterConditionValue + Get + PokeEncounterConditionValue + + Gets encounter condition values from PokeAPI + + + + The Get-PokeEncounterConditionValue cmdlet gets encounter condition values from PokeAPI + Encounter condition values are the various states that an encounter condition can have, i.e., time of day can be either day or night. + + + + Get-PokeEncounterConditionValue + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeEncounterConditionValue + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeEncounterConditionValue + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeEncounterConditionValue + + Gets the first 20 encounter condition values sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeEncounterConditionValue -id 1 + + Gets the encounter condition value with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeEncounterConditionValue -name ditto + + Gets the encounter condition value with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeEncounterConditionValue -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterConditionValue.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterConditionValue.html + + + + + + Get-PokeEncounterMethod + Get + PokeEncounterMethod + + Gets encounter methods from PokeAPI + + + + The Get-PokeEncounterMethod cmdlet gets encounter methods from PokeAPI + Methods by which the player might can encounter Pokemon in the wild, e.g., walking in tall grass + + + + Get-PokeEncounterMethod + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeEncounterMethod + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeEncounterMethod + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeEncounterMethod + + Gets the first 20 encounter methods sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeEncounterMethod -id 1 + + Gets the encounter method with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeEncounterMethod -name ditto + + Gets the encounter method with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeEncounterMethod -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterMethod.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterMethod.html + + + + + + Get-PokeEvolutionChain + Get + PokeEvolutionChain + + Gets evolution chains from PokeAPI + + + + The Get-PokeEvolutionChain cmdlet gets evolution chains from PokeAPI + Evolution chains are essentially family trees. They start with the lowest stage within a family and detail evolution conditions for each as well as Pokemon they can evolve into up through the hierarchy. + + + + Get-PokeEvolutionChain + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeEvolutionChain + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeEvolutionChain + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeEvolutionChain + + Gets the first 20 evolution chains sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeEvolutionChain -id 1 + + Gets the evolution chain with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeEvolutionChain -name ditto + + Gets the evolution chain with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeEvolutionChain -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/evolution/Get-PokeEvolutionChain.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/evolution/Get-PokeEvolutionChain.html + + + + + + Get-PokeEvolutionTrigger + Get + PokeEvolutionTrigger + + Gets evolution triggers from PokeAPI + + + + The Get-PokeEvolutionTrigger cmdlet gets evolution triggers from PokeAPI + Evolution triggers are the events and conditions that cause a Pokemon to evolve + + + + Get-PokeEvolutionTrigger + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeEvolutionTrigger + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeEvolutionTrigger + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeEvolutionTrigger + + Gets the first 20 evolution triggers sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeEvolutionTrigger -id 1 + + Gets the evolution trigger with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeEvolutionTrigger -name ditto + + Gets the evolution trigger with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeEvolutionTrigger -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/evolution/Get-PokeEvolutionTrigger.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/evolution/Get-PokeEvolutionTrigger.html + + + + + + Get-PokeGameGeneration + Get + PokeGameGeneration + + Gets game generations from PokeAPI + + + + The Get-PokeGameGeneration cmdlet gets game generations from PokeAPI + A generation is a grouping of the Pokemon games that separates them based on the Pokemon they include. + In each generation, a new set of Pokemon, Moves, Abilities and Types that did not exist in the previous generation are released. + + + + Get-PokeGameGeneration + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeGameGeneration + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeGameGeneration + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeGameGeneration + + Gets the first 20 game generations sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeGameGeneration -id 1 + + Gets the game generation with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeGameGeneration -name ditto + + Gets the game generation with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeGameGeneration -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameGeneration.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameGeneration.html + + + + + + Get-PokeGamePokedex + Get + PokeGamePokedex + + Gets game pokedexes from PokeAPI + + + + The Get-PokeGamePokedex cmdlet gets game pokedexes from PokeAPI + A Pokedex is a handheld electronic encyclopedia device; one which is capable of recording and retaining information of the various Pokemon in a given region with the exception of the national dex and some smaller dexes related to portions of a region + + + + Get-PokeGamePokedex + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeGamePokedex + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeGamePokedex + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeGamePokedex + + Gets the first 20 game pokedexes sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeGamePokedex -id 1 + + Gets the game pokedex with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeGamePokedex -name ditto + + Gets the game pokedex with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeGamePokedex -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGamePokedex.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGamePokedex.html + + + + + + Get-PokeGameVersion + Get + PokeGameVersion + + Gets game versions from PokeAPI + + + + The Get-PokeGameVersion cmdlet gets game versions from PokeAPI + Versions of the games, e.g., Red, Blue or Yellow + + + + Get-PokeGameVersion + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeGameVersion + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeGameVersion + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeGameVersion + + Gets the first 20 game versions sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeGameVersion -id 1 + + Gets the game version with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeGameVersion -name ditto + + Gets the game version with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeGameVersion -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameVersion.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameVersion.html + + + + + + Get-PokeGameVersionGroup + Get + PokeGameVersionGroup + + Gets game version groups from PokeAPI + + + + The Get-PokeGameVersionGroup cmdlet gets game version groups from PokeAPI + Version groups categorize highly similar versions of the games + + + + Get-PokeGameVersionGroup + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeGameVersionGroup + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeGameVersionGroup + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeGameVersionGroup + + Gets the first 20 game version groups sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeGameVersionGroup -id 1 + + Gets the game version group with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeGameVersionGroup -name ditto + + Gets the game version group with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeGameVersionGroup -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameVersionGroup.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameVersionGroup.html + + + + + + Add-PokeBaseURI + Add + PokeBaseURI + + Sets the base URI for the Poke API connection. + + + + The Add-PokeBaseURI cmdlet sets the base URI which is later used to construct the full URI for all API calls. + + + + Add-PokeBaseURI + + base_uri + + Define the base URI for the Poke API connection using Poke's URI or a custom URI. + + String + + String + + + Https://pokeapi.co/api/v2 + + + + + + base_uri + + Define the base URI for the Poke API connection using Poke's URI or a custom URI. + + String + + String + + + Https://pokeapi.co/api/v2 + + + + + + + N\A + + + + + -------------------------- EXAMPLE 1 -------------------------- + Add-PokeBaseURI + + The base URI will use https://pokeapi.co/api/v2/ which is Poke's default URI. + + + + -------------------------- EXAMPLE 2 -------------------------- + Add-PokeBaseURI -base_uri http://myapi.gateway.example.com + + A custom API gateway of http://myapi.gateway.example.com will be used for all API calls to Poke's API. + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Add-PokeBaseURI.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Add-PokeBaseURI.html + + + + + + ConvertTo-PokeQueryString + ConvertTo + PokeQueryString + + Converts uri filter parameters + + + + The Invoke-PokeRequest cmdlet converts & formats uri filter parameters from a function which are later used to make the full resource uri for an API call + This is an internal helper function the ties in directly with the Invoke-PokeRequest & any public functions that define parameters + + + + ConvertTo-PokeQueryString + + uri_Filter + + Hashtable of values to combine a functions parameters with the resource_Uri parameter. + This allows for the full uri query to occur + + Hashtable + + Hashtable + + + None + + + resource_Uri + + Defines the short resource uri (url) to use when creating the API call + + String + + String + + + None + + + + + + uri_Filter + + Hashtable of values to combine a functions parameters with the resource_Uri parameter. + This allows for the full uri query to occur + + Hashtable + + Hashtable + + + None + + + resource_Uri + + Defines the short resource uri (url) to use when creating the API call + + String + + String + + + None + + + + + + + N\A + + + + + -------------------------- EXAMPLE 1 -------------------------- + ConvertTo-PokeQueryString -uri_Filter $uri_Filter -resource_Uri '/account' + + Example: (From public function) $uri_Filter = @{} + ForEach ( $Key in $PSBoundParameters.GetEnumerator() ){ if( $excludedParameters -contains $Key.Key ){$null} else{ $uri_Filter += @{ $Key.Key = $Key.Value } } } + 1x key = https://pokeapi.co/api/v2/account?accountId=12345 2x key = https://pokeapi.co/api/v2/account?accountId=12345&details=True + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/ConvertTo-PokeQueryString.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/ConvertTo-PokeQueryString.html + + + + + + Export-PokeModuleSettings + Export + PokeModuleSettings + + Exports the Poke BaseURI, API, & JSON configuration information to file. + + + + The Export-PokeModuleSettings cmdlet exports the Poke BaseURI information to file. + + + + Export-PokeModuleSettings + + PokeConfPath + + Define the location to store the Poke configuration file. + By default the configuration file is stored in the following location: $env:USERPROFILE\PokeAPI + + String + + String + + + $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ) + + + PokeConfFile + + Define the name of the Poke configuration file. + By default the configuration file is named: config.psd1 + + String + + String + + + Config.psd1 + + + + + + PokeConfPath + + Define the location to store the Poke configuration file. + By default the configuration file is stored in the following location: $env:USERPROFILE\PokeAPI + + String + + String + + + $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ) + + + PokeConfFile + + Define the name of the Poke configuration file. + By default the configuration file is named: config.psd1 + + String + + String + + + Config.psd1 + + + + + + + N\A + + + + + -------------------------- EXAMPLE 1 -------------------------- + Export-PokeModuleSettings + + Validates that the BaseURI is set then exports their values to the current user's Poke configuration file located at: $env:USERPROFILE\PokeAPI\config.psd1 + + + + -------------------------- EXAMPLE 2 -------------------------- + Export-PokeModuleSettings -PokeConfPath C:\PokeAPI -PokeConfFile MyConfig.psd1 + + Validates that the BaseURI is set then exports their values to the current user's Poke configuration file located at: C:\PokeAPI\MyConfig.psd1 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Export-PokeModuleSettings.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Export-PokeModuleSettings.html + + + + + + Get-PokeBaseURI + Get + PokeBaseURI + + Shows the Poke base URI global variable. + + + + The Get-PokeBaseURI cmdlet shows the Poke base URI global variable value. + + + + Get-PokeBaseURI + + + + + + + + N\A + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeBaseURI + + Shows the Poke base URI global variable value. + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeBaseURI.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeBaseURI.html + + + + + + Get-PokeMetaData + Get + PokeMetaData + + Gets various Api metadata values + + + + The Get-PokeMetaData cmdlet gets various Api metadata values from an Invoke-WebRequest to assist in various troubleshooting scenarios such as rate-limiting. + + + + Get-PokeMetaData + + base_uri + + Define the base URI for the Poke API connection using Poke's URI or a custom URI. + The default base URI is https://pokeapi.co/api/v2 + + String + + String + + + $Poke_Base_URI + + + + + + base_uri + + Define the base URI for the Poke API connection using Poke's URI or a custom URI. + The default base URI is https://pokeapi.co/api/v2 + + String + + String + + + $Poke_Base_URI + + + + + + + N\A + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeMetaData + + Gets various Api metadata values from an Invoke-WebRequest to assist in various troubleshooting scenarios such as rate-limiting. + The default full base uri test path is: https://pokeapi.co/api/v2 + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeMetaData -base_uri http://myapi.gateway.example.com + + Gets various Api metadata values from an Invoke-WebRequest to assist in various troubleshooting scenarios such as rate-limiting. + The full base uri test path in this example is: http://myapi.gateway.example.com/device + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeMetaData.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeMetaData.html + + + + + + Get-PokeModuleSettings + Get + PokeModuleSettings + + Gets the saved Poke configuration settings + + + + The Get-PokeModuleSettings cmdlet gets the saved Poke configuration settings from the local system. + By default the configuration file is stored in the following location: $env:USERPROFILE\PokeAPI + + + + Get-PokeModuleSettings + + PokeConfPath + + Define the location to store the Poke configuration file. + By default the configuration file is stored in the following location: $env:USERPROFILE\PokeAPI + + String + + String + + + $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ) + + + PokeConfFile + + Define the name of the Poke configuration file. + By default the configuration file is named: config.psd1 + + String + + String + + + Config.psd1 + + + + Get-PokeModuleSettings + + openConfFile + + Opens the Poke configuration file + + + SwitchParameter + + + False + + + + + + PokeConfPath + + Define the location to store the Poke configuration file. + By default the configuration file is stored in the following location: $env:USERPROFILE\PokeAPI + + String + + String + + + $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ) + + + PokeConfFile + + Define the name of the Poke configuration file. + By default the configuration file is named: config.psd1 + + String + + String + + + Config.psd1 + + + openConfFile + + Opens the Poke configuration file + + SwitchParameter + + SwitchParameter + + + False + + + + + + + N\A + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeModuleSettings + + Gets the contents of the configuration file that was created with the Export-PokeModuleSettings + The default location of the Poke configuration file is: $env:USERPROFILE\PokeAPI\config.psd1 + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeModuleSettings -PokeConfPath C:\PokeAPI -PokeConfFile MyConfig.psd1 -openConfFile + + Opens the configuration file from the defined location in the default editor + The location of the Poke configuration file in this example is: C:\PokeAPI\MyConfig.psd1 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeModuleSettings.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeModuleSettings.html + + + + + + Import-PokeModuleSettings + Import + PokeModuleSettings + + Imports the Poke BaseURI information to the current session. + + + + The Import-PokeModuleSettings cmdlet imports the Poke BaseURI stored in the Poke configuration file to the users current session. + By default the configuration file is stored in the following location: $env:USERPROFILE\PokeAPI + + + + Import-PokeModuleSettings + + PokeConfPath + + Define the location to store the Poke configuration file. + By default the configuration file is stored in the following location: $env:USERPROFILE\PokeAPI + + String + + String + + + $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ) + + + PokeConfFile + + Define the name of the Poke configuration file. + By default the configuration file is named: config.psd1 + + String + + String + + + Config.psd1 + + + + + + PokeConfPath + + Define the location to store the Poke configuration file. + By default the configuration file is stored in the following location: $env:USERPROFILE\PokeAPI + + String + + String + + + $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ) + + + PokeConfFile + + Define the name of the Poke configuration file. + By default the configuration file is named: config.psd1 + + String + + String + + + Config.psd1 + + + + + + + N\A + + + + + -------------------------- EXAMPLE 1 -------------------------- + Import-PokeModuleSettings + + Validates that the configuration file created with the Export-PokeModuleSettings cmdlet exists then imports the stored data into the current users session. + The default location of the Poke configuration file is: $env:USERPROFILE\PokeAPI\config.psd1 + + + + -------------------------- EXAMPLE 2 -------------------------- + Import-PokeModuleSettings -PokeConfPath C:\PokeAPI -PokeConfFile MyConfig.psd1 + + Validates that the configuration file created with the Export-PokeModuleSettings cmdlet exists then imports the stored data into the current users session. + The location of the Poke configuration file in this example is: C:\PokeAPI\MyConfig.psd1 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Import-PokeModuleSettings.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Import-PokeModuleSettings.html + + + + + + Invoke-PokeRequest + Invoke + PokeRequest + + Makes an API request + + + + The Invoke-PokeRequest cmdlet invokes an API request to Poke API. + This is an internal function that is used by all public functions + As of 2023-08 the Poke v1 API only supports GET requests + + + + Invoke-PokeRequest + + method + + Defines the type of API method to use + Allowed values: 'GET', 'PUT' + + String + + String + + + GET + + + resource_Uri + + Defines the resource uri (url) to use when creating the API call + + String + + String + + + None + + + uri_Filter + + Used with the internal function [ ConvertTo-PokeQueryString ] to combine a functions parameters with the resource_Uri parameter. + This allows for the full uri query to occur + The full resource path is made with the following data $Poke_Base_URI + $resource_Uri + ConvertTo-PokeQueryString + + Hashtable + + Hashtable + + + None + + + allPages + + Returns all items from an endpoint + When using this parameter there is no need to use either the page or perPage parameters + + + SwitchParameter + + + False + + + + + + method + + Defines the type of API method to use + Allowed values: 'GET', 'PUT' + + String + + String + + + GET + + + resource_Uri + + Defines the resource uri (url) to use when creating the API call + + String + + String + + + None + + + uri_Filter + + Used with the internal function [ ConvertTo-PokeQueryString ] to combine a functions parameters with the resource_Uri parameter. + This allows for the full uri query to occur + The full resource path is made with the following data $Poke_Base_URI + $resource_Uri + ConvertTo-PokeQueryString + + Hashtable + + Hashtable + + + None + + + allPages + + Returns all items from an endpoint + When using this parameter there is no need to use either the page or perPage parameters + + SwitchParameter + + SwitchParameter + + + False + + + + + + + N\A + + + + + -------------------------- EXAMPLE 1 -------------------------- + Invoke-PokeRequest -method GET -resource_Uri '/account' -uri_Filter $uri_Filter + + Invoke a rest method against the defined resource using any of the provided parameters + Example: Name Value ---- ----- Method GET Uri https://pokeapi.co/api/v2/account?accountId=12345&details=True + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Invoke-PokeRequest.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Invoke-PokeRequest.html + + + + + + Remove-PokeBaseURI + Remove + PokeBaseURI + + Removes the Poke base URI global variable. + + + + The Remove-PokeBaseURI cmdlet removes the Poke base URI global variable. + + + + Remove-PokeBaseURI + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + SwitchParameter + + + False + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + SwitchParameter + + + False + + + + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + False + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + N\A + + + + + -------------------------- EXAMPLE 1 -------------------------- + Remove-PokeBaseURI + + Removes the Poke base URI global variable. + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Remove-PokeBaseURI.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Remove-PokeBaseURI.html + + + + + + Remove-PokeModuleSettings + Remove + PokeModuleSettings + + Removes the stored Poke configuration folder. + + + + The Remove-PokeModuleSettings cmdlet removes the Poke folder and its files. This cmdlet also has the option to remove sensitive Poke variables as well. + By default configuration files are stored in the following location and will be removed: $env:USERPROFILE\PokeAPI + + + + Remove-PokeModuleSettings + + PokeConfPath + + Define the location of the Poke configuration folder. + By default the configuration folder is located at: $env:USERPROFILE\PokeAPI + + String + + String + + + $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ) + + + andVariables + + Define if sensitive Poke variables should be removed as well. + By default the variables are not removed. + + + SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + + SwitchParameter + + + False + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + + SwitchParameter + + + False + + + + + + PokeConfPath + + Define the location of the Poke configuration folder. + By default the configuration folder is located at: $env:USERPROFILE\PokeAPI + + String + + String + + + $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ) + + + andVariables + + Define if sensitive Poke variables should be removed as well. + By default the variables are not removed. + + SwitchParameter + + SwitchParameter + + + False + + + WhatIf + + Shows what would happen if the cmdlet runs. The cmdlet is not run. + + SwitchParameter + + SwitchParameter + + + False + + + Confirm + + Prompts you for confirmation before running the cmdlet. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + N\A + + + + + -------------------------- EXAMPLE 1 -------------------------- + Remove-PokeModuleSettings + + Checks to see if the default configuration folder exists and removes it if it does. + The default location of the Poke configuration folder is: $env:USERPROFILE\PokeAPI + + + + -------------------------- EXAMPLE 2 -------------------------- + Remove-PokeModuleSettings -PokeConfPath C:\PokeAPI -andVariables + + Checks to see if the defined configuration folder exists and removes it if it does. If sensitive Poke variables exist then they are removed as well. + The location of the Poke configuration folder in this example is: C:\PokeAPI + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Remove-PokeModuleSettings.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Remove-PokeModuleSettings.html + + + + + + Get-PokeItem + Get + PokeItem + + Gets items from PokeAPI + + + + The Get-PokeItem cmdlet gets items from PokeAPI + An item is an object in the games which the player can pick up, keep in their bag, and use in some manner + They have various uses, including healing, powering up, helping catch Pokemon, or to access a new area + + + + Get-PokeItem + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeItem + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeItem + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeItem + + Gets the first 20 items sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeItem -id 1 + + Gets the item with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeItem -name ditto + + Gets the item with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeItem -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItem.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItem.html + + + + + + Get-PokeItemAttribute + Get + PokeItemAttribute + + Gets item attributes from PokeAPI + + + + The Get-PokeItemAttribute cmdlet gets item attributes from PokeAPI + Item attributes define particular aspects of items, e.g. "usable in battle" or "consumable" + + + + Get-PokeItemAttribute + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeItemAttribute + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeItemAttribute + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeItemAttribute + + Gets the first 20 item attributes sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeItemAttribute -id 1 + + Gets the item attribute with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeItemAttribute -name ditto + + Gets the item attribute with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeItemAttribute -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemAttribute.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemAttribute.html + + + + + + Get-PokeItemCategory + Get + PokeItemCategory + + Gets item categories from PokeAPI + + + + The Get-PokeItemCategory cmdlet gets item categories from PokeAPI + Item categories determine where items will be placed in the players bag + + + + Get-PokeItemCategory + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeItemCategory + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeItemCategory + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeItemCategory + + Gets the first 20 item categories sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeItemCategory -id 1 + + Gets the item category with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeItemCategory -name ditto + + Gets the item category with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeItemCategory -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemCategory.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemCategory.html + + + + + + Get-PokeItemFlingEffect + Get + PokeItemFlingEffect + + Gets item fling effects from PokeAPI + + + + The Get-PokeItemFlingEffect cmdlet gets item fling effects from PokeAPI + The various effects of the move "Fling" when used with different items + + + + Get-PokeItemFlingEffect + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeItemFlingEffect + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeItemFlingEffect + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeItemFlingEffect + + Gets the first 20 item fling effects sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeItemFlingEffect -id 1 + + Gets the item fling effect with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeItemFlingEffect -name ditto + + Gets the item fling effect with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeItemFlingEffect -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemFlingEffect.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemFlingEffect.html + + + + + + Get-PokeItemPocket + Get + PokeItemPocket + + Gets item pockets from PokeAPI + + + + The Get-PokeItemPocket cmdlet gets item pockets from PokeAPI + Pockets within the players bag used for storing items by category + + + + Get-PokeItemPocket + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeItemPocket + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeItemPocket + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeItemPocket + + Gets the first 20 item pockets sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeItemPocket -id 1 + + Gets the item pocket with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeItemPocket -name ditto + + Gets the item pocket with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeItemPocket -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemPocket.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemPocket.html + + + + + + Get-PokeLocation + Get + PokeLocation + + Gets locations from PokeAPI + + + + The Get-PokeLocation cmdlet gets locations from PokeAPI + Locations that can be visited within the games + Locations make up sizable portions of regions, like cities or routes + + + + Get-PokeLocation + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeLocation + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeLocation + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeLocation + + Gets the first 20 locations sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeLocation -id 1 + + Gets the location with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeLocation -name ditto + + Gets the location with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeLocation -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocation.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocation.html + + + + + + Get-PokeLocationArea + Get + PokeLocationArea + + Gets location areas from PokeAPI + + + + The Get-PokeLocationArea cmdlet gets location areas from PokeAPI + Location areas are sections of areas, such as floors in a building or cave + Each area has its own set of possible Pokemon encounters + + + + Get-PokeLocationArea + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeLocationArea + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeLocationArea + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeLocationArea + + Gets the first 20 location areas sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeLocationArea -id 1 + + Gets the location area with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeLocationArea -name ditto + + Gets the location area with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeLocationArea -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationArea.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationArea.html + + + + + + Get-PokeLocationPalParkArea + Get + PokeLocationPalParkArea + + Gets pal park areas from PokeAPI + + + + The Get-PokeLocationPalParkArea cmdlet gets pal park areas from PokeAPI + Areas used for grouping Pokemon encounters in Pal Park + They're like habitats that are specific to Pal Park + + + + Get-PokeLocationPalParkArea + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeLocationPalParkArea + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeLocationPalParkArea + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeLocationPalParkArea + + Gets the first 20 pal park areas sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeLocationPalParkArea -id 1 + + Gets the pal park area with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeLocationPalParkArea -name ditto + + Gets the pal park area with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeLocationPalParkArea -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationPalParkArea.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationPalParkArea.html + + + + + + Get-PokeLocationRegion + Get + PokeLocationRegion + + Gets regions from PokeAPI + + + + The Get-PokeLocationRegion cmdlet gets regions from PokeAPI + A region is an organized area of the Pokemon world + Most often, the main difference between regions is the species of Pokemon that can be encountered within them. + + + + Get-PokeLocationRegion + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeLocationRegion + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeLocationRegion + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeLocationRegion + + Gets the first 20 regions sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeLocationRegion -id 1 + + Gets the region with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeLocationRegion -name ditto + + Gets the region with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeLocationRegion -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationRegion.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationRegion.html + + + + + + Get-PokeMachine + Get + PokeMachine + + Gets machines from PokeAPI + + + + The Get-PokeMachine cmdlet gets machines from PokeAPI + Machines are the representation of items that teach moves to Pokemon + They vary from version to version, so it is not certain that one specific TM or HM corresponds to a single Machine + + + + Get-PokeMachine + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeMachine + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeMachine + + Gets the first 20 machines sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeMachine -id 1 + + Gets the machine with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeMachine -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/machine/Get-PokeMachine.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/machine/Get-PokeMachine.html + + + + + + Get-PokeMove + Get + PokeMove + + Gets moves from PokeAPI + + + + The Get-PokeMove cmdlet gets moves from PokeAPI + Moves are the skills of Pokemon in battle. In battle, a Pokemon uses one move each turn. + Some moves (including those learned by Hidden Machine) can be used outside of battle as well, usually for the purpose of removing obstacles or exploring new areas. + + + + Get-PokeMove + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeMove + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeMove + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeMove + + Gets the first 20 moves sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeMove -id 1 + + Gets the move with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeMove -name ditto + + Gets the move with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeMove -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMove.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMove.html + + + + + + Get-PokeMoveAilment + Get + PokeMoveAilment + + Gets move ailments from PokeAPI + + + + The Get-PokeMoveAilment cmdlet gets move ailments from PokeAPI + Move Ailments are status conditions caused by moves used during battle + + + + Get-PokeMoveAilment + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeMoveAilment + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeMoveAilment + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeMoveAilment + + Gets the first 20 move ailments sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeMoveAilment -id 1 + + Gets the move ailment with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeMoveAilment -name ditto + + Gets the move ailment with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeMoveAilment -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveAilment.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveAilment.html + + + + + + Get-PokeMoveBattleStyle + Get + PokeMoveBattleStyle + + Gets move battle styles from PokeAPI + + + + The Get-PokeMoveBattleStyle cmdlet gets move battle styles from PokeAPI + Styles of moves when used in the Battle Palace + + + + Get-PokeMoveBattleStyle + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeMoveBattleStyle + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeMoveBattleStyle + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeMoveBattleStyle + + Gets the first 20 move battle styles sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeMoveBattleStyle -id 1 + + Gets the move battle style with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeMoveBattleStyle -name ditto + + Gets the move battle style with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeMoveBattleStyle -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveBattleStyle.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveBattleStyle.html + + + + + + Get-PokeMoveCategory + Get + PokeMoveCategory + + Gets move categories from PokeAPI + + + + The Get-PokeMoveCategory cmdlet gets move categories from PokeAPI + Very general categories that loosely group move effects + + + + Get-PokeMoveCategory + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeMoveCategory + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeMoveCategory + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeMoveCategory + + Gets the first 20 move categories sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeMoveCategory -id 1 + + Gets the move category with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeMoveCategory -name ditto + + Gets the move category with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeMoveCategory -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveCategory.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveCategory.html + + + + + + Get-PokeMoveDamageClass + Get + PokeMoveDamageClass + + Gets move damage classes from PokeAPI + + + + The Get-PokeMoveDamageClass cmdlet gets move damage classes from PokeAPI + Damage classes moves can have, e.g. physical, special, or non-damaging + + + + Get-PokeMoveDamageClass + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeMoveDamageClass + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeMoveDamageClass + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeMoveDamageClass + + Gets the first 20 move damage classes sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeMoveDamageClass -id 1 + + Gets the move damage class with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeMoveDamageClass -name ditto + + Gets the move damage class with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeMoveDamageClass -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveDamageClass.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveDamageClass.html + + + + + + Get-PokeMoveLearnMethod + Get + PokeMoveLearnMethod + + Gets move learn methods from PokeAPI + + + + The Get-PokeMoveLearnMethod cmdlet gets move learn methods from PokeAPI + Methods by which Pokemon can learn moves + + + + Get-PokeMoveLearnMethod + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeMoveLearnMethod + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeMoveLearnMethod + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeMoveLearnMethod + + Gets the first 20 move learn methods sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeMoveLearnMethod -id 1 + + Gets the move learn method with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeMoveLearnMethod -name ditto + + Gets the move learn method with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeMoveLearnMethod -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveLearnMethod.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveLearnMethod.html + + + + + + Get-PokeMoveTarget + Get + PokeMoveTarget + + Gets move targets from PokeAPI + + + + The Get-PokeMoveTarget cmdlet gets move targets from PokeAPI + Targets moves can be directed at during battle + Targets can be Pokemon, environments or even other moves. + + + + Get-PokeMoveTarget + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeMoveTarget + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeMoveTarget + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeMoveTarget + + Gets the first 20 move targets sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeMoveTarget -id 1 + + Gets the move target with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeMoveTarget -name ditto + + Gets the move target with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeMoveTarget -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveTarget.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveTarget.html + + + + + + Get-PokePokemon + Get + PokePokemon + + Gets Pokemon from PokeAPI + + + + The Get-PokePokemon cmdlet gets Pokemon from PokeAPI + Pokemon are the creatures that inhabit the world of the Pokemon games. They can be caught using Pokeballs and trained by battling with other Pokemon. Each Pokemon belongs to a specific species but may take on a variant which makes it differ from other Pokemon of the same species, such as base stats, available abilities and typings. + + + + Get-PokePokemon + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokePokemon + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokePokemon + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokePokemon + + Gets the first 20 pokemon sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokePokemon -id 1 + + Gets the pokemon with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokePokemon -name ditto + + Gets the pokemon with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokePokemon -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemon.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemon.html + + + + + + Get-PokePokemonAbility + Get + PokePokemonAbility + + Gets Pokemon abilities from PokeAPI + + + + The Get-PokePokemonAbility cmdlet gets Pokemon abilities from PokeAPI + Abilities provide passive effects for Pokemon in battle or in the overworld. Pokemon have multiple possible abilities but can have only one ability at a time + + + + Get-PokePokemonAbility + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokePokemonAbility + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokePokemonAbility + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokePokemonAbility + + Gets the first 20 Pokemon abilities sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokePokemonAbility -id 1 + + Gets the Pokemon ability with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokePokemonAbility -name ditto + + Gets the Pokemon ability with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokePokemonAbility -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonAbility.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonAbility.html + + + + + + Get-PokePokemonCharacteristic + Get + PokePokemonCharacteristic + + Gets Pokemon characteristics from PokeAPI + + + + The Get-PokePokemonCharacteristic cmdlet gets Pokemon characteristics from PokeAPI + Characteristics indicate which stat contains a Pokemon's highest IV. A Pokemon's Characteristic is determined by the remainder of its highest IV divided by 5 (gene_modulo). + + + + Get-PokePokemonCharacteristic + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokePokemonCharacteristic + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokePokemonCharacteristic + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokePokemonCharacteristic + + Gets the first 20 Pokemon characteristics sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokePokemonCharacteristic -id 1 + + Gets the Pokemon characteristic with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokePokemonCharacteristic -name ditto + + Gets the Pokemon characteristic with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokePokemonCharacteristic -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonCharacteristic.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonCharacteristic.html + + + + + + Get-PokePokemonColor + Get + PokePokemonColor + + Gets pokemon colors from PokeAPI + + + + The Get-PokePokemonColor cmdlet gets pokemon colors from PokeAPI + Colors used for sorting Pokemon in a Pokedex. The color listed in the Pokedex is usually the color most apparent or covering each Pokemon's body. No orange category exists; Pokemon that are primarily orange are listed as red or brown. + + + + Get-PokePokemonColor + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokePokemonColor + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokePokemonColor + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokePokemonColor + + Gets the first 20 pokemon colors sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokePokemonColor -id 1 + + Gets the pokemon color with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokePokemonColor -name ditto + + Gets the pokemon color with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokePokemonColor -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonColor.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonColor.html + + + + + + Get-PokePokemonEggGroup + Get + PokePokemonEggGroup + + Gets egg groups from PokeAPI + + + + The Get-PokePokemonEggGroup cmdlet gets egg groups from PokeAPI + Egg Groups are categories which determine which Pokemon are able to interbreed. Pokemon may belong to either one or two Egg Groups + + + + Get-PokePokemonEggGroup + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokePokemonEggGroup + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokePokemonEggGroup + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokePokemonEggGroup + + Gets the first 20 egg groups sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokePokemonEggGroup -id 1 + + Gets the egg group with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokePokemonEggGroup -name ditto + + Gets the egg group with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokePokemonEggGroup -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonEggGroup.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonEggGroup.html + + + + + + Get-PokePokemonEncounter + Get + PokePokemonEncounter + + Gets pokemon location areas from PokeAPI + + + + The Get-PokePokemonEncounter cmdlet gets pokemon location areas from PokeAPI + Pokemon Location Areas are ares where Pokemon can be found + + + + Get-PokePokemonEncounter + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokePokemonEncounter + + name + + Defines name of the resource + + String + + String + + + None + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokePokemonEncounter -id 1 + + Gets the pokemon location area with the defined id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokePokemonEncounter -name ditto + + Gets the pokemon location area with the defined name + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonEncounter.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonEncounter.html + + + + + + Get-PokePokemonGender + Get + PokePokemonGender + + Gets genders from PokeAPI + + + + The Get-PokePokemonGender cmdlet gets genders from PokeAPI + Genders were introduced in Generation II for the purposes of breeding Pokemon but can also result in visual differences or even different evolutionary lines + + + + Get-PokePokemonGender + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokePokemonGender + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokePokemonGender + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokePokemonGender + + Gets the first 20 genders sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokePokemonGender -id 1 + + Gets the gender with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokePokemonGender -name ditto + + Gets the gender with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokePokemonGender -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonGender.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonGender.html + + + + + + Get-PokePokemonGrowthRate + Get + PokePokemonGrowthRate + + Gets growth rates from PokeAPI + + + + The Get-PokePokemonGrowthRate cmdlet gets growth rates from PokeAPI + Growth rates are the speed with which Pokemon gain levels through experience + + + + Get-PokePokemonGrowthRate + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokePokemonGrowthRate + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokePokemonGrowthRate + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokePokemonGrowthRate + + Gets the first 20 growth rates sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokePokemonGrowthRate -id 1 + + Gets the growth rate with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokePokemonGrowthRate -name ditto + + Gets the growth rate with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokePokemonGrowthRate -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonGrowthRate.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonGrowthRate.html + + + + + + Get-PokePokemonHabitat + Get + PokePokemonHabitat + + Gets pokemon habitats from PokeAPI + + + + The Get-PokePokemonHabitat cmdlet gets pokemon habitats from PokeAPI + Habitats are generally different terrain Pokemon can be found in but can also be areas designated for rare or legendary Pokemon. + + + + Get-PokePokemonHabitat + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokePokemonHabitat + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokePokemonHabitat + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokePokemonHabitat + + Gets the first 20 pokemon habitats sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokePokemonHabitat -id 1 + + Gets the pokemon habitat with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokePokemonHabitat -name ditto + + Gets the pokemon habitat with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokePokemonHabitat -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonHabitat.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonHabitat.html + + + + + + Get-PokePokemonNature + Get + PokePokemonNature + + Gets natures from PokeAPI + + + + The Get-PokePokemonNature cmdlet gets natures from PokeAPI + Natures influence how a Pokemon's stats grow + + + + Get-PokePokemonNature + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokePokemonNature + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokePokemonNature + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokePokemonNature + + Gets the first 20 natures sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokePokemonNature -id 1 + + Gets the nature with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokePokemonNature -name ditto + + Gets the nature with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokePokemonNature -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonNature.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonNature.html + + + + + + Get-PokePokemonPokeathlonStat + Get + PokePokemonPokeathlonStat + + Gets pokeathlon stats from PokeAPI + + + + The Get-PokePokemonPokeathlonStat cmdlet gets pokeathlon stats from PokeAPI + Pokeathlon Stats are different attributes of a Pokemon's performance in Pokeathlons. In Pokeathlons, competitions happen on different courses; one for each of the different Pokeathlon stats + + + + Get-PokePokemonPokeathlonStat + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokePokemonPokeathlonStat + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokePokemonPokeathlonStat + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokePokemonPokeathlonStat + + Gets the first 20 pokeathlon stats sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokePokemonPokeathlonStat -id 1 + + Gets the pokeathlon stat with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokePokemonPokeathlonStat -name ditto + + Gets the pokeathlon stat with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokePokemonPokeathlonStat -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonPokeathlonStat.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonPokeathlonStat.html + + + + + + Get-PokePokemonShape + Get + PokePokemonShape + + Gets pokemon shapes from PokeAPI + + + + The Get-PokePokemonShape cmdlet gets pokemon shapes from PokeAPI + Shapes used for sorting Pokemon in a Pokedex + + + + Get-PokePokemonShape + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokePokemonShape + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokePokemonShape + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokePokemonShape + + Gets the first 20 pokemon shapes sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokePokemonShape -id 1 + + Gets the pokemon shape with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokePokemonShape -name ditto + + Gets the pokemon shape with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokePokemonShape -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonShape.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonShape.html + + + + + + Get-PokePokemonSpecies + Get + PokePokemonSpecies + + Gets pokemon species from PokeAPI + + + + The Get-PokePokemonSpecies cmdlet gets pokemon species from PokeAPI + A Pokemon Species forms the basis for at least one Pokemon. Attributes of a Pokemon species are shared across all varieties of Pokemon within the species. + A good example is Wormadam; Wormadam is the species which can be found in three different varieties, Wormadam-Trash, Wormadam-Sandy and Wormadam-Plant. + + + + Get-PokePokemonSpecies + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokePokemonSpecies + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokePokemonSpecies + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokePokemonSpecies + + Gets the first 20 pokemon species sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokePokemonSpecies -id 1 + + Gets the pokemon species with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokePokemonSpecies -name ditto + + Gets the pokemon species with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokePokemonSpecies -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonSpecies.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonSpecies.html + + + + + + Get-PokePokemonStat + Get + PokePokemonStat + + Gets pokemon stats from PokeAPI + + + + The Get-PokePokemonStat cmdlet gets pokemon stats from PokeAPI + Stats determine certain aspects of battles. Each Pokemon has a value for each stat which grows as they gain levels and can be altered momentarily by effects in battles. + + + + Get-PokePokemonStat + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokePokemonStat + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokePokemonStat + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokePokemonStat + + Gets the first 20 pokemon stats sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokePokemonStat -id 1 + + Gets the pokemon stat with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokePokemonStat -name ditto + + Gets the pokemon stat with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokePokemonStat -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonStat.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonStat.html + + + + + + Get-PokePokemonType + Get + PokePokemonType + + Gets pokemon move type properties from PokeAPI + + + + The Get-PokePokemonType cmdlet gets pokemon move type properties from PokeAPI + Types are properties for Pokemon and their moves. Each type has three properties: which types of Pokemon it is super effective against, which types of Pokemon it is not very effective against, and which types of Pokemon it is completely ineffective against. + + + + Get-PokePokemonType + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokePokemonType + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokePokemonType + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokePokemonType + + Gets the first 20 pokemon move type properties sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokePokemonType -id 1 + + Gets the pokemon move type property with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokePokemonType -name ditto + + Gets the pokemon move type property with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokePokemonType -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonType.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonType.html + + + + + + Get-PokeEndpoint + Get + PokeEndpoint + + Gets endpoints from PokeAPI + + + + The Get-PokeEndpoint cmdlet gets endpoints from PokeAPI + + + + Get-PokeEndpoint + + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeEndpoint + + Gets the endpoints from PokeAPI + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/utility/Get-PokeEndpoint.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/utility/Get-PokeEndpoint.html + + + + + + Get-PokeLanguage + Get + PokeLanguage + + Gets languages from PokeAPI + + + + The Get-PokeLanguage cmdlet gets languages from PokeAPI + Languages for translations of API resource information + + + + Get-PokeLanguage + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + + Get-PokeLanguage + + name + + Defines name of the resource + + String + + String + + + None + + + + Get-PokeLanguage + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + + SwitchParameter + + + False + + + + + + id + + Defines id of the resource + + Int32 + + Int32 + + + 0 + + + name + + Defines name of the resource + + String + + String + + + None + + + offset + + Defines the page number to return + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + limit + + Defines the amount of resources to return with each page + By default only 20 resources are returned + + Int32 + + Int32 + + + 0 + + + allPages + + Returns all resources from an endpoint + As of 2024-02, there is no cap on how many resources can be returned using the limit parameter. There is currently no real use for this parameter and it was included simply to account if pagination is introduced. + + SwitchParameter + + SwitchParameter + + + False + + + + + + + n/a + + + + + -------------------------- EXAMPLE 1 -------------------------- + Get-PokeLanguage + + Gets the first 20 languages sorted by id + + + + -------------------------- EXAMPLE 2 -------------------------- + Get-PokeLanguage -id 1 + + Gets the language with the defined id + + + + -------------------------- EXAMPLE 3 -------------------------- + Get-PokeLanguage -name ditto + + Gets the language with the defined name + + + + -------------------------- EXAMPLE 4 -------------------------- + Get-PokeLanguage -offset 151 -limit 100 + + Gets the first 100 resources starting at resources with an id over 151 + + + + + + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/utility/Get-PokeLanguage.html + https://celerium.github.io/PokeAPI-PowerShellWrapper/site/utility/Get-PokeLanguage.html + + + + \ No newline at end of file diff --git a/docs/favicon.ico b/docs/favicon.ico new file mode 100644 index 0000000..18794dd Binary files /dev/null and b/docs/favicon.ico differ diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 0000000..dd210d7 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,372 @@ +--- +external help file: PokeAPI-help.xml +Module Name: PokeAPI +online version: https://github.com/Celerium/PokeAPI-PowerShellWrapper +schema: 2.0.0 +title: Home +has_children: true +layout: default +nav_order: 1 +--- + +

+
+ _CeleriumDemo +
+ Celerium_PokeAPI +
+

+ +[![Az_Pipeline][Az_Pipeline-shield]][Az_Pipeline-url] +[![GitHub_Pages][GitHub_Pages-shield]][GitHub_Pages-url] + +[![PoshGallery_Version][PoshGallery_Version-shield]][PoshGallery_Version-url] +[![PoshGallery_Platforms][PoshGallery_Platforms-shield]][PoshGallery_Platforms-url] +[![PoshGallery_Downloads][PoshGallery_Downloads-shield]][PoshGallery_Downloads-url] +[![codeSize][codeSize-shield]][codeSize-url] + +[![Contributors][contributors-shield]][contributors-url] +[![Forks][forks-shield]][forks-url] +[![Stargazers][stars-shield]][stars-url] +[![Issues][issues-shield]][issues-url] + +[![Blog][Website-shield]][Website-url] +[![GitHub_License][GitHub_License-shield]][GitHub_License-url] +--- + +## Buy me a coffee + +Whether you use this project, have learned something from it, or just like it, please consider supporting it by buying me a coffee, so I can dedicate more time on open-source projects like this :) + +Buy Me A Coffee + +--- + + + + +
+ + +--- + + + +## About The Project + +The [PokeAPI](https://pokeapi.co/) offers users the ability to extract data from Poke into third-party reporting tools and aims to abstract away the details of interacting with Poke's API endpoints in such a way that is consistent with PowerShell nomenclature. This gives system administrators and PowerShell developers a convenient and familiar way of using Poke's API to create documentation scripts, automation, and integrations. + +- :book: Project documentation can be found on [Github Pages](https://celerium.github.io/PokeAPI-PowerShellWrapper/) +- :book: Poke's REST API documentation on their website [here](https://pokeapi.co/docs/v2). + +Poke features a REST API that makes use of common HTTP request methods. In order to maintain PowerShell best practices, only approved verbs are used. + +- GET -> Get- + +Additionally, PowerShell's `verb-noun` nomenclature is respected. Each noun is prefixed with `Poke` in an attempt to prevent naming problems. + +For example, one might access the `/pokemon/` endpoint by running the following PowerShell command with the appropriate parameters: + +```posh +Get-PokePokemon -id 1 +``` + +

(back to top)

+ +## Install + +This module can be installed directly from the [PowerShell Gallery](https://www.powershellgallery.com/packages/PokeAPI) with the following command: + +```posh +Install-Module -Name PokeAPI +``` + +- :information_source: This module supports PowerShell 5.0+ and *should* work in PowerShell Core. +- :information_source: If you are running an older version of PowerShell, or if PowerShellGet is unavailable, you can manually download the *main* branch and place the *PokeAPI* folder into the (default) `C:\Program Files\WindowsPowerShell\Modules` folder. + +Project documentation can be found on [Github Pages](https://celerium.github.io/PokeAPI-PowerShellWrapper/) + +- A full list of functions can be retrieved by running `Get-Command -Module PokeAPI`. +- Help info and a list of parameters can be found by running `Get-Help `, such as: + +```posh +Get-Help Get-PokePokemon +Get-Help Get-PokePokemon -Full +``` + +

(back to top)

+ +## Initial Setup + +After installing this module, you will need to configure both the *base URI* & *API access tokens* that are used to talk with the Poke API. + +1. Run `Add-PokeBaseURI` + - By default, Poke's `https://pokeapi.co/api/v2` URI is used. + - If you have your own API gateway or proxy, you may put in your own custom URI by specifying the `-base_uri` parameter: + - `Add-PokeBaseURI -base_uri http://myapi.gateway.celerium.org` +
+ +2. [**optional**] Run `Export-PokeModuleSettings` + - This will create a config file at `%UserProfile%\PokeAPI` that holds the *base uri* & *API access tokens* information. + - Next time you run `Import-Module -Name PokeAPI`, this configuration file will automatically be loaded. + +

(back to top)

+ +## Usage + +Calling an API resource is as simple as running `Get-Poke` + +- The following is a table of supported functions and their corresponding API resources: +- Table entries with [ `-` ] indicate that the functionality is **NOT** supported by the Poke API at this time. + +|Category |EndpointUri |Method|Function | +|---------|----------------------------------------|------|-------------------------------| +|berry |/berry/ |GET |Get-PokeBerry | +|berry |/berry/{id or name}/ |GET |Get-PokeBerry | +|berry |/berry-firmness |GET |Get-PokeBerryFirmness | +|berry |/berry-firmness/{id or name}/ |GET |Get-PokeBerryFirmness | +|berry |/berry-flavor/ |GET |Get-PokeBerryFlavor | +|berry |/berry-flavor/{id or name}/ |GET |Get-PokeBerryFlavor | +|contest |/contest-type/ |GET |Get-PokeContestType | +|contest |/contest-type/{id or name}/ |GET |Get-PokeContestType | +|contest |/contest-effect/ |GET |Get-PokeContestEffect | +|contest |/contest-effect/{id}/ |GET |Get-PokeContestEffect | +|contest |/super-contest-effect/ |GET |Get-PokeContestSuperEffect | +|contest |/super-contest-effect/{id}/ |GET |Get-PokeContestSuperEffect | +|encounter|/encounter-method/ |GET |Get-PokeEncounterMethod | +|encounter|/encounter-method/{id or name}/ |GET |Get-PokeEncounterMethod | +|encounter|/encounter-condition/ |GET |Get-PokeEncounterCondition | +|encounter|/encounter-condition/{id or name}/ |GET |Get-PokeEncounterCondition | +|encounter|/encounter-condition-value/{id or name}/|GET |Get-PokeEncounterConditionValue| +|encounter|/encounter-condition-value/{id or name}/|GET |Get-PokeEncounterConditionValue| +|evolution|/evolution-chain/ |GET |Get-PokeEvolutionChain | +|evolution|/evolution-chain/{id}/ |GET |Get-PokeEvolutionChain | +|evolution|/evolution-trigger/ |GET |Get-PokeEvolutionTrigger | +|evolution|/evolution-trigger/{id or name}/ |GET |Get-PokeEvolutionTrigger | +|game |/generation/ |GET |Get-PokeGameGeneration | +|game |/generation/{id or name}/ |GET |Get-PokeGameGeneration | +|game |/pokedex/ |GET |Get-PokeGamePokedex | +|game |/pokedex/{id or name}/ |GET |Get-PokeGamePokedex | +|game |/version/ |GET |Get-PokeGameVersion | +|game |/version/{id or name}/ |GET |Get-PokeGameVersion | +|game |/version-group/ |GET |Get-PokeGameVersionGroup | +|game |/version-group/{id or name}/ |GET |Get-PokeGameVersionGroup | +|Internal | |POST |Add-PokeBaseURI | +|Internal | |PUT |ConvertTo-PokeQueryString | +|Internal | |GET |Export-PokeModuleSettings | +|Internal | |GET |Get-PokeBaseURI | +|Internal | |GET |Get-PokeMetaData | +|Internal | |GET |Get-PokeModuleSettings | +|Internal | |SET |Import-PokeModuleSettings | +|Internal | |GET |Invoke-PokeRequest | +|Internal | |DELETE|Remove-PokeBaseURI | +|Internal | |DELETE|Remove-PokeModuleSettings | +|item |/item/ |GET |Get-PokeItem | +|item |/item/{id or name}/ |GET |Get-PokeItem | +|item |/item-attribute/ |GET |Get-PokeItemAttribute | +|item |/item-attribute/{id or name}/ |GET |Get-PokeItemAttribute | +|item |/item-category/ |GET |Get-PokeItemCategory | +|item |/item-category/{id or name}/ |GET |Get-PokeItemCategory | +|item |/item-fling-effect/ |GET |Get-PokeItemFlingEffect | +|item |/item-fling-effect/{id or name}/ |GET |Get-PokeItemFlingEffect | +|item |/item-pocket/ |GET |Get-PokeItemPocket | +|item |/item-pocket/{id or name}/ |GET |Get-PokeItemPocket | +|location |/location/ |GET |Get-PokeLocation | +|location |/location/{id or name}/ |GET |Get-PokeLocation | +|location |/location-area/ |GET |Get-PokeLocationArea | +|location |/location-area/{id or name}/ |GET |Get-PokeLocationArea | +|location |/pal-park-area/ |GET |Get-PokeLocationPalParkArea | +|location |/pal-park-area/{id or name}/ |GET |Get-PokeLocationPalParkArea | +|location |/region/ |GET |Get-PokeLocationRegion | +|location |/region/{id or name}/ |GET |Get-PokeLocationRegion | +|machine |/machine/ |GET |Get-PokeMachine | +|machine |/machine/{id}/ |GET |Get-PokeMachine | +|move |/move/ |GET |Get-PokeMove | +|move |/move/{id or name}/ |GET |Get-PokeMove | +|move |/move-ailment/ |GET |Get-PokeMoveAilment | +|move |/move-ailment/{id or name}/ |GET |Get-PokeMoveAilment | +|move |/move-battle-style/ |GET |Get-PokeMoveBattleStyle | +|move |/move-battle-style/{id or name}/ |GET |Get-PokeMoveBattleStyle | +|move |/move-category/ |GET |Get-PokeMoveCategory | +|move |/move-category/{id or name}/ |GET |Get-PokeMoveCategory | +|move |/move-damage-class/ |GET |Get-PokeMoveDamageClass | +|move |/move-damage-class/{id or name}/ |GET |Get-PokeMoveDamageClass | +|move |/move-learn-method/ |GET |Get-PokeMoveLearnMethod | +|move |/move-learn-method/{id or name}/ |GET |Get-PokeMoveLearnMethod | +|move |/move-target/ |GET |Get-PokeMoveTarget | +|move |/move-target/{id or name}/ |GET |Get-PokeMoveTarget | +|pokemon |/ability/ |GET |Get-PokePokemonAbility | +|pokemon |/ability/{id or name}/ |GET |Get-PokePokemonAbility | +|pokemon |/characteristic/ |GET |Get-PokePokemonCharacteristic | +|pokemon |/characteristic/{id}/ |GET |Get-PokePokemonCharacteristic | +|pokemon |/egg-group/ |GET |Get-PokePokemonEggGroup | +|pokemon |/egg-group/{id or name}/ |GET |Get-PokePokemonEggGroup | +|pokemon |/gender/ |GET |Get-PokePokemonGender | +|pokemon |/gender/{id or name}/ |GET |Get-PokePokemonGender | +|pokemon |/growth-rate/ |GET |Get-PokePokemonGrowthRate | +|pokemon |/growth-rate/{id or name}/ |GET |Get-PokePokemonGrowthRate | +|pokemon |/nature/ |GET |Get-PokePokemonNature | +|pokemon |/nature/{id or name}/ |GET |Get-PokePokemonNature | +|pokemon |/pokeathlon-stat/ |GET |Get-PokePokemonPokeathlonStat | +|pokemon |/pokeathlon-stat/{id or name}/ |GET |Get-PokePokemonPokeathlonStat | +|pokemon |/pokemon/ |GET |Get-PokePokemon | +|pokemon |/pokemon/{id or name}/ |GET |Get-PokePokemon | +|pokemon |/pokemon/{id or name}/encounters |GET |Get-PokePokemonEncounter | +|pokemon |/pokemon-color/ |GET |Get-PokePokemonColor | +|pokemon |/pokemon-color/{id or name}/ |GET |Get-PokePokemonColor | +|pokemon |/pokemon-form/ |GET |Get-PokePokemonForm | +|pokemon |/pokemon-form/{id or name}/ |GET |Get-PokePokemonForm | +|pokemon |/pokemon-habitat/ |GET |Get-PokePokemonHabitat | +|pokemon |/pokemon-habitat/{id or name}/ |GET |Get-PokePokemonHabitat | +|pokemon |/pokemon-shape/ |GET |Get-PokePokemonShape | +|pokemon |/pokemon-shape/{id or name}/ |GET |Get-PokePokemonShape | +|pokemon |/pokemon-species/ |GET |Get-PokePokemonSpecies | +|pokemon |/pokemon-species/{id or name}/ |GET |Get-PokePokemonSpecies | +|pokemon |/stat/ |GET |Get-PokePokemonStat | +|pokemon |/stat/{id or name}/ |GET |Get-PokePokemonStat | +|pokemon |/type/ |GET |Get-PokePokemonType | +|pokemon |/type/{id or name}/ |GET |Get-PokePokemonType | +|utility |/language/ |GET |Get-PokeLanguage | +|utility |/language/{id or name}/ |GET |Get-PokeLanguage | +|utility |/ |GET |Get-PokeEndpoint | + +Each `Get-Poke*` function will respond with the raw data that Poke's API provides. + +

(back to top)

+ +## Roadmap + +- [ ] Add Changelog +- [x] Build more robust Pester & ScriptAnalyzer tests +- [x] Figure out how to do CI & PowerShell gallery automation +- [ ] Add example scripts & automation + +See the [open issues](https://github.com/Celerium/PokeAPI-PowerShellWrapper/issues) for a full list of proposed features (and known issues). + +

(back to top)

+ +--- + +## Contributing + +Contributions are what makes the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**. + +If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". +Don't forget to give the project a star! Thanks again! + +See the [CONTRIBUTING](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) guide for more information about contributing. + +

(back to top)

+ +## License + +Distributed under the MIT License. See [`LICENSE`](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/LICENSE) for more information. + +[![GitHub_License][GitHub_License-shield]][GitHub_License-url] + +

(back to top)

+ +## Contact + +
+ +

+ · + Website + · + Email + · + Reddit + · +

+
+ +

(back to top)

+ +## Acknowledgments + +Big thank you to the following people and services as they have provided me with lots of helpful information as I continue this project! + +- [GitHub Pages](https://pages.github.com) +- [Img Shields](https://shields.io) +- [Font Awesome](https://fontawesome.com) +- [Choose an Open Source License](https://choosealicense.com) +- [GitHub Emoji Cheat Sheet](https://www.webpagefx.com/tools/emoji-cheat-sheet) + +

(back to top)

+ + + + +[Az_Pipeline-shield]: https://img.shields.io/azure-devops/build/AzCelerium/PokeAPI/4?style=for-the-badge&label=DevOps_Build +[Az_Pipeline-url]: https://dev.azure.com/AzCelerium/PokeAPI/_build?definitionId=4 + +[GitHub_Pages-shield]: https://img.shields.io/github/actions/workflow/status/celerium/PokeAPI-PowerShellWrapper/pages%2Fpages-build-deployment?style=for-the-badge&label=GitHub%20Pages +[GitHub_Pages-url]: https://github.com/Celerium/PokeAPI-PowerShellWrapper/actions/workflows/pages/pages-build-deployment + +[GitHub_License-shield]: https://img.shields.io/github/license/celerium/PokeAPI-PowerShellWrapper?style=for-the-badge +[GitHub_License-url]: https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/LICENSE + +[PoshGallery_Version-shield]: https://img.shields.io/powershellgallery/v/PokeAPI?include_prereleases&style=for-the-badge +[PoshGallery_Version-url]: https://www.powershellgallery.com/packages/PokeAPI + +[PoshGallery_Platforms-shield]: https://img.shields.io/powershellgallery/p/PokeAPI?style=for-the-badge +[PoshGallery_Platforms-url]: https://www.powershellgallery.com/packages/PokeAPI + +[PoshGallery_Downloads-shield]: https://img.shields.io/powershellgallery/dt/PokeAPI?style=for-the-badge +[PoshGallery_Downloads-url]: https://www.powershellgallery.com/packages/PokeAPI + +[website-shield]: https://img.shields.io/website?up_color=blue&url=https%3A%2F%2Fcelerium.org&style=for-the-badge&label=Blog +[website-url]: https://celerium.org + +[codeSize-shield]: https://img.shields.io/github/repo-size/celerium/PokeAPI-PowerShellWrapper?style=for-the-badge +[codeSize-url]: https://github.com/Celerium/PokeAPI-PowerShellWrapper + +[contributors-shield]: https://img.shields.io/github/contributors/celerium/PokeAPI-PowerShellWrapper?style=for-the-badge +[contributors-url]: https://github.com/Celerium/PokeAPI-PowerShellWrapper/graphs/contributors + +[forks-shield]: https://img.shields.io/github/forks/celerium/PokeAPI-PowerShellWrapper?style=for-the-badge +[forks-url]: https://github.com/Celerium/PokeAPI-PowerShellWrapper/network/members + +[stars-shield]: https://img.shields.io/github/stars/celerium/PokeAPI-PowerShellWrapper?style=for-the-badge +[stars-url]: https://github.com/Celerium/PokeAPI-PowerShellWrapper/stargazers + +[issues-shield]: https://img.shields.io/github/issues/Celerium/PokeAPI-PowerShellWrapper?style=for-the-badge +[issues-url]: https://github.com/Celerium/PokeAPI-PowerShellWrapper/issues diff --git a/docs/site/Internal/Add-PokeBaseURI.md b/docs/site/Internal/Add-PokeBaseURI.md new file mode 100644 index 0000000..d5e01cb --- /dev/null +++ b/docs/site/Internal/Add-PokeBaseURI.md @@ -0,0 +1,72 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: Internal +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Add-PokeBaseURI.html +parent: POST +schema: 2.0.0 +title: Add-PokeBaseURI +--- + +# Add-PokeBaseURI + +## SYNOPSIS +Sets the base URI for the Poke API connection. + +## SYNTAX + +```powershell +Add-PokeBaseURI [[-base_uri] ] [] +``` + +## DESCRIPTION +The Add-PokeBaseURI cmdlet sets the base URI which is later used +to construct the full URI for all API calls. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Add-PokeBaseURI +``` + +The base URI will use https://pokeapi.co/api/v2/ which is Poke's default URI. + +### EXAMPLE 2 +```powershell +Add-PokeBaseURI -base_uri http://myapi.gateway.example.com +``` + +A custom API gateway of http://myapi.gateway.example.com will be used for all API calls to Poke's API. + +## PARAMETERS + +### -base_uri +Define the base URI for the Poke API connection using Poke's URI or a custom URI. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: Https://pokeapi.co/api/v2 +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +N\A + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Add-PokeBaseURI.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Add-PokeBaseURI.html) + diff --git a/docs/site/Internal/ConvertTo-PokeQueryString.md b/docs/site/Internal/ConvertTo-PokeQueryString.md new file mode 100644 index 0000000..6e3a111 --- /dev/null +++ b/docs/site/Internal/ConvertTo-PokeQueryString.md @@ -0,0 +1,96 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: Internal +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/ConvertTo-PokeQueryString.html +parent: PUT +schema: 2.0.0 +title: ConvertTo-PokeQueryString +--- + +# ConvertTo-PokeQueryString + +## SYNOPSIS +Converts uri filter parameters + +## SYNTAX + +```powershell +ConvertTo-PokeQueryString [-uri_Filter] [-resource_Uri] [] +``` + +## DESCRIPTION +The Invoke-PokeRequest cmdlet converts & formats uri filter parameters +from a function which are later used to make the full resource uri for +an API call + +This is an internal helper function the ties in directly with the +Invoke-PokeRequest & any public functions that define parameters + +## EXAMPLES + +### EXAMPLE 1 +```powershell +ConvertTo-PokeQueryString -uri_Filter $uri_Filter -resource_Uri '/account' +``` + +Example: (From public function) + $uri_Filter = @{} + + ForEach ( $Key in $PSBoundParameters.GetEnumerator() ){ + if( $excludedParameters -contains $Key.Key ){$null} + else{ $uri_Filter += @{ $Key.Key = $Key.Value } } + } + + 1x key = https://pokeapi.co/api/v2/account?accountId=12345 + 2x key = https://pokeapi.co/api/v2/account?accountId=12345&details=True + +## PARAMETERS + +### -uri_Filter +Hashtable of values to combine a functions parameters with +the resource_Uri parameter. + +This allows for the full uri query to occur + +```yaml +Type: Hashtable +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -resource_Uri +Defines the short resource uri (url) to use when creating the API call + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +N\A + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/ConvertTo-PokeQueryString.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/ConvertTo-PokeQueryString.html) + diff --git a/docs/site/Internal/DELETE.md b/docs/site/Internal/DELETE.md new file mode 100644 index 0000000..1341ced --- /dev/null +++ b/docs/site/Internal/DELETE.md @@ -0,0 +1,5 @@ +--- +title: DELETE +parent: Internal +has_children: true +--- diff --git a/docs/site/Internal/Export-PokeModuleSettings.md b/docs/site/Internal/Export-PokeModuleSettings.md new file mode 100644 index 0000000..b79be61 --- /dev/null +++ b/docs/site/Internal/Export-PokeModuleSettings.md @@ -0,0 +1,96 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: Internal +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Export-PokeModuleSettings.html +parent: GET +schema: 2.0.0 +title: Export-PokeModuleSettings +--- + +# Export-PokeModuleSettings + +## SYNOPSIS +Exports the Poke BaseURI, API, & JSON configuration information to file. + +## SYNTAX + +```powershell +Export-PokeModuleSettings [-PokeConfPath ] [-PokeConfFile ] [] +``` + +## DESCRIPTION +The Export-PokeModuleSettings cmdlet exports the Poke BaseURI information to file. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Export-PokeModuleSettings +``` + +Validates that the BaseURI is set then exports their values +to the current user's Poke configuration file located at: + $env:USERPROFILE\PokeAPI\config.psd1 + +### EXAMPLE 2 +```powershell +Export-PokeModuleSettings -PokeConfPath C:\PokeAPI -PokeConfFile MyConfig.psd1 +``` + +Validates that the BaseURI is set then exports their values +to the current user's Poke configuration file located at: + C:\PokeAPI\MyConfig.psd1 + +## PARAMETERS + +### -PokeConfPath +Define the location to store the Poke configuration file. + +By default the configuration file is stored in the following location: + $env:USERPROFILE\PokeAPI + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ) +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PokeConfFile +Define the name of the Poke configuration file. + +By default the configuration file is named: + config.psd1 + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: Config.psd1 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +N\A + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Export-PokeModuleSettings.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Export-PokeModuleSettings.html) + diff --git a/docs/site/Internal/GET.md b/docs/site/Internal/GET.md new file mode 100644 index 0000000..90af912 --- /dev/null +++ b/docs/site/Internal/GET.md @@ -0,0 +1,5 @@ +--- +title: GET +parent: Internal +has_children: true +--- diff --git a/docs/site/Internal/Get-PokeBaseURI.md b/docs/site/Internal/Get-PokeBaseURI.md new file mode 100644 index 0000000..bd5f3f6 --- /dev/null +++ b/docs/site/Internal/Get-PokeBaseURI.md @@ -0,0 +1,49 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: Internal +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeBaseURI.html +parent: GET +schema: 2.0.0 +title: Get-PokeBaseURI +--- + +# Get-PokeBaseURI + +## SYNOPSIS +Shows the Poke base URI global variable. + +## SYNTAX + +```powershell +Get-PokeBaseURI [] +``` + +## DESCRIPTION +The Get-PokeBaseURI cmdlet shows the Poke base URI global variable value. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeBaseURI +``` + +Shows the Poke base URI global variable value. + +## PARAMETERS + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +N\A + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeBaseURI.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeBaseURI.html) + diff --git a/docs/site/Internal/Get-PokeMetaData.md b/docs/site/Internal/Get-PokeMetaData.md new file mode 100644 index 0000000..a5582a1 --- /dev/null +++ b/docs/site/Internal/Get-PokeMetaData.md @@ -0,0 +1,83 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: Internal +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeMetaData.html +parent: GET +schema: 2.0.0 +title: Get-PokeMetaData +--- + +# Get-PokeMetaData + +## SYNOPSIS +Gets various Api metadata values + +## SYNTAX + +```powershell +Get-PokeMetaData [[-base_uri] ] [] +``` + +## DESCRIPTION +The Get-PokeMetaData cmdlet gets various Api metadata values from an +Invoke-WebRequest to assist in various troubleshooting scenarios such +as rate-limiting. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeMetaData +``` + +Gets various Api metadata values from an Invoke-WebRequest to assist +in various troubleshooting scenarios such as rate-limiting. + +The default full base uri test path is: + https://pokeapi.co/api/v2 + +### EXAMPLE 2 +```powershell +Get-PokeMetaData -base_uri http://myapi.gateway.example.com +``` + +Gets various Api metadata values from an Invoke-WebRequest to assist +in various troubleshooting scenarios such as rate-limiting. + +The full base uri test path in this example is: + http://myapi.gateway.example.com/device + +## PARAMETERS + +### -base_uri +Define the base URI for the Poke API connection using Poke's URI or a custom URI. + +The default base URI is https://pokeapi.co/api/v2 + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: $Poke_Base_URI +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +N\A + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeMetaData.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeMetaData.html) + diff --git a/docs/site/Internal/Get-PokeModuleSettings.md b/docs/site/Internal/Get-PokeModuleSettings.md new file mode 100644 index 0000000..b441a38 --- /dev/null +++ b/docs/site/Internal/Get-PokeModuleSettings.md @@ -0,0 +1,124 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: Internal +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeModuleSettings.html +parent: GET +schema: 2.0.0 +title: Get-PokeModuleSettings +--- + +# Get-PokeModuleSettings + +## SYNOPSIS +Gets the saved Poke configuration settings + +## SYNTAX + +### index (Default) +```powershell +Get-PokeModuleSettings [-PokeConfPath ] [-PokeConfFile ] [] +``` + +### show +```powershell +Get-PokeModuleSettings [-openConfFile] [] +``` + +## DESCRIPTION +The Get-PokeModuleSettings cmdlet gets the saved Poke configuration settings +from the local system. + +By default the configuration file is stored in the following location: + $env:USERPROFILE\PokeAPI + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeModuleSettings +``` + +Gets the contents of the configuration file that was created with the +Export-PokeModuleSettings + +The default location of the Poke configuration file is: + $env:USERPROFILE\PokeAPI\config.psd1 + +### EXAMPLE 2 +```powershell +Get-PokeModuleSettings -PokeConfPath C:\PokeAPI -PokeConfFile MyConfig.psd1 -openConfFile +``` + +Opens the configuration file from the defined location in the default editor + +The location of the Poke configuration file in this example is: + C:\PokeAPI\MyConfig.psd1 + +## PARAMETERS + +### -PokeConfPath +Define the location to store the Poke configuration file. + +By default the configuration file is stored in the following location: + $env:USERPROFILE\PokeAPI + +```yaml +Type: String +Parameter Sets: index +Aliases: + +Required: False +Position: Named +Default value: $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ) +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PokeConfFile +Define the name of the Poke configuration file. + +By default the configuration file is named: + config.psd1 + +```yaml +Type: String +Parameter Sets: index +Aliases: + +Required: False +Position: Named +Default value: Config.psd1 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -openConfFile +Opens the Poke configuration file + +```yaml +Type: SwitchParameter +Parameter Sets: show +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +N\A + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeModuleSettings.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Get-PokeModuleSettings.html) + diff --git a/docs/site/Internal/Import-PokeModuleSettings.md b/docs/site/Internal/Import-PokeModuleSettings.md new file mode 100644 index 0000000..72e751e --- /dev/null +++ b/docs/site/Internal/Import-PokeModuleSettings.md @@ -0,0 +1,104 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: Internal +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Import-PokeModuleSettings.html +parent: SET +schema: 2.0.0 +title: Import-PokeModuleSettings +--- + +# Import-PokeModuleSettings + +## SYNOPSIS +Imports the Poke BaseURI information to the current session. + +## SYNTAX + +```powershell +Import-PokeModuleSettings [-PokeConfPath ] [-PokeConfFile ] [] +``` + +## DESCRIPTION +The Import-PokeModuleSettings cmdlet imports the Poke BaseURI stored in the +Poke configuration file to the users current session. + +By default the configuration file is stored in the following location: + $env:USERPROFILE\PokeAPI + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Import-PokeModuleSettings +``` + +Validates that the configuration file created with the Export-PokeModuleSettings cmdlet exists +then imports the stored data into the current users session. + +The default location of the Poke configuration file is: + $env:USERPROFILE\PokeAPI\config.psd1 + +### EXAMPLE 2 +```powershell +Import-PokeModuleSettings -PokeConfPath C:\PokeAPI -PokeConfFile MyConfig.psd1 +``` + +Validates that the configuration file created with the Export-PokeModuleSettings cmdlet exists +then imports the stored data into the current users session. + +The location of the Poke configuration file in this example is: + C:\PokeAPI\MyConfig.psd1 + +## PARAMETERS + +### -PokeConfPath +Define the location to store the Poke configuration file. + +By default the configuration file is stored in the following location: + $env:USERPROFILE\PokeAPI + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ) +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -PokeConfFile +Define the name of the Poke configuration file. + +By default the configuration file is named: + config.psd1 + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: Config.psd1 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +N\A + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Import-PokeModuleSettings.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Import-PokeModuleSettings.html) + diff --git a/docs/site/Internal/Invoke-PokeRequest.md b/docs/site/Internal/Invoke-PokeRequest.md new file mode 100644 index 0000000..ef0dd71 --- /dev/null +++ b/docs/site/Internal/Invoke-PokeRequest.md @@ -0,0 +1,132 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: Internal +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Invoke-PokeRequest.html +parent: GET +schema: 2.0.0 +title: Invoke-PokeRequest +--- + +# Invoke-PokeRequest + +## SYNOPSIS +Makes an API request + +## SYNTAX + +```powershell +Invoke-PokeRequest [[-method] ] [-resource_Uri] [[-uri_Filter] ] [-allPages] + [] +``` + +## DESCRIPTION +The Invoke-PokeRequest cmdlet invokes an API request to Poke API. + +This is an internal function that is used by all public functions + +As of 2023-08 the Poke v1 API only supports GET requests + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Invoke-PokeRequest -method GET -resource_Uri '/account' -uri_Filter $uri_Filter +``` + +Invoke a rest method against the defined resource using any of the provided parameters + +Example: + Name Value + ---- ----- + Method GET + Uri https://pokeapi.co/api/v2/account?accountId=12345&details=True + +## PARAMETERS + +### -method +Defines the type of API method to use + +Allowed values: +'GET', 'PUT' + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 1 +Default value: GET +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -resource_Uri +Defines the resource uri (url) to use when creating the API call + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -uri_Filter +Used with the internal function \[ ConvertTo-PokeQueryString \] to combine +a functions parameters with the resource_Uri parameter. + +This allows for the full uri query to occur + +The full resource path is made with the following data +$Poke_Base_URI + $resource_Uri + ConvertTo-PokeQueryString + +```yaml +Type: Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all items from an endpoint + +When using this parameter there is no need to use either the page or perPage +parameters + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +N\A + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Invoke-PokeRequest.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Invoke-PokeRequest.html) + diff --git a/docs/site/Internal/POST.md b/docs/site/Internal/POST.md new file mode 100644 index 0000000..ded5a3a --- /dev/null +++ b/docs/site/Internal/POST.md @@ -0,0 +1,5 @@ +--- +title: POST +parent: Internal +has_children: true +--- diff --git a/docs/site/Internal/PUT.md b/docs/site/Internal/PUT.md new file mode 100644 index 0000000..31dccaa --- /dev/null +++ b/docs/site/Internal/PUT.md @@ -0,0 +1,5 @@ +--- +title: PUT +parent: Internal +has_children: true +--- diff --git a/docs/site/Internal/Remove-PokeBaseURI.md b/docs/site/Internal/Remove-PokeBaseURI.md new file mode 100644 index 0000000..b057036 --- /dev/null +++ b/docs/site/Internal/Remove-PokeBaseURI.md @@ -0,0 +1,80 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: Internal +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Remove-PokeBaseURI.html +parent: DELETE +schema: 2.0.0 +title: Remove-PokeBaseURI +--- + +# Remove-PokeBaseURI + +## SYNOPSIS +Removes the Poke base URI global variable. + +## SYNTAX + +```powershell +Remove-PokeBaseURI [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +The Remove-PokeBaseURI cmdlet removes the Poke base URI global variable. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Remove-PokeBaseURI +``` + +Removes the Poke base URI global variable. + +## PARAMETERS + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +N\A + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Remove-PokeBaseURI.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Remove-PokeBaseURI.html) + diff --git a/docs/site/Internal/Remove-PokeModuleSettings.md b/docs/site/Internal/Remove-PokeModuleSettings.md new file mode 100644 index 0000000..203b4a1 --- /dev/null +++ b/docs/site/Internal/Remove-PokeModuleSettings.md @@ -0,0 +1,133 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: Internal +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Remove-PokeModuleSettings.html +parent: DELETE +schema: 2.0.0 +title: Remove-PokeModuleSettings +--- + +# Remove-PokeModuleSettings + +## SYNOPSIS +Removes the stored Poke configuration folder. + +## SYNTAX + +```powershell +Remove-PokeModuleSettings [-PokeConfPath ] [-andVariables] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +The Remove-PokeModuleSettings cmdlet removes the Poke folder and its files. +This cmdlet also has the option to remove sensitive Poke variables as well. + +By default configuration files are stored in the following location and will be removed: + $env:USERPROFILE\PokeAPI + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Remove-PokeModuleSettings +``` + +Checks to see if the default configuration folder exists and removes it if it does. + +The default location of the Poke configuration folder is: + $env:USERPROFILE\PokeAPI + +### EXAMPLE 2 +```powershell +Remove-PokeModuleSettings -PokeConfPath C:\PokeAPI -andVariables +``` + +Checks to see if the defined configuration folder exists and removes it if it does. +If sensitive Poke variables exist then they are removed as well. + +The location of the Poke configuration folder in this example is: + C:\PokeAPI + +## PARAMETERS + +### -PokeConfPath +Define the location of the Poke configuration folder. + +By default the configuration folder is located at: + $env:USERPROFILE\PokeAPI + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: $(Join-Path -Path $home -ChildPath $(if ($IsWindows -or $PSEdition -eq 'Desktop'){"PokeAPI"}else{".PokeAPI"}) ) +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -andVariables +Define if sensitive Poke variables should be removed as well. + +By default the variables are not removed. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -WhatIf +Shows what would happen if the cmdlet runs. +The cmdlet is not run. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: wi + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -Confirm +Prompts you for confirmation before running the cmdlet. + +```yaml +Type: SwitchParameter +Parameter Sets: (All) +Aliases: cf + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +N\A + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Remove-PokeModuleSettings.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Remove-PokeModuleSettings.html) + diff --git a/docs/site/Internal/index.md b/docs/site/Internal/index.md new file mode 100644 index 0000000..10da4cb --- /dev/null +++ b/docs/site/Internal/index.md @@ -0,0 +1,18 @@ +--- +title: Internal +has_children: true +--- + +## Internal - endpoint help & documentation + +{: .highlight } +Some functions will handle more than one endpoint and the numbers below show the total endpoints **not** the total functions + +| **Method** | **Endpoint Count** | +|------------|---------------------| +| DELETE | 2 | +| GET | 5 | +| POST | 1 | +| PUT | 1 | + +Have a look around and if you would like to contribute please read over the [Contributing guide](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) diff --git a/docs/site/_Unique/DELETE.md b/docs/site/_Unique/DELETE.md new file mode 100644 index 0000000..2b36b1f --- /dev/null +++ b/docs/site/_Unique/DELETE.md @@ -0,0 +1,5 @@ +--- +title: DELETE +parent: _Unique +has_children: true +--- diff --git a/docs/site/_Unique/GET.md b/docs/site/_Unique/GET.md new file mode 100644 index 0000000..cf846bd --- /dev/null +++ b/docs/site/_Unique/GET.md @@ -0,0 +1,5 @@ +--- +title: GET +parent: _Unique +has_children: true +--- diff --git a/docs/site/_Unique/POST.md b/docs/site/_Unique/POST.md new file mode 100644 index 0000000..0d2219a --- /dev/null +++ b/docs/site/_Unique/POST.md @@ -0,0 +1,5 @@ +--- +title: POST +parent: _Unique +has_children: true +--- diff --git a/docs/site/_Unique/PUT.md b/docs/site/_Unique/PUT.md new file mode 100644 index 0000000..02beb46 --- /dev/null +++ b/docs/site/_Unique/PUT.md @@ -0,0 +1,5 @@ +--- +title: PUT +parent: _Unique +has_children: true +--- diff --git a/docs/site/_Unique/Set-PokeBaseURI.md b/docs/site/_Unique/Set-PokeBaseURI.md new file mode 100644 index 0000000..905e178 --- /dev/null +++ b/docs/site/_Unique/Set-PokeBaseURI.md @@ -0,0 +1,53 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: _Unique +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/_Unique/Set-PokeBaseURI.html +parent: Special +schema: 2.0.0 +title: Set-PokeBaseURI +--- + +# Set-PokeBaseURI + +## SYNOPSIS +Sets the base URI for the Poke API connection. + +## SYNTAX + +## DESCRIPTION +The Add-PokeBaseURI cmdlet sets the base URI which is later used +to construct the full URI for all API calls. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Add-PokeBaseURI +``` + +The base URI will use https://pokeapi.co/api/v2/ which is Poke's default URI. + +### EXAMPLE 2 +```powershell +Add-PokeBaseURI -base_uri http://myapi.gateway.example.com +``` + +A custom API gateway of http://myapi.gateway.example.com will be used for all API calls to Poke's API. + +## PARAMETERS + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +N\A + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Add-PokeBaseURI.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/Internal/Add-PokeBaseURI.html) + diff --git a/docs/site/_Unique/index.md b/docs/site/_Unique/index.md new file mode 100644 index 0000000..c692cde --- /dev/null +++ b/docs/site/_Unique/index.md @@ -0,0 +1,18 @@ +--- +title: _Unique +has_children: true +--- + +## _Unique - endpoint help & documentation + +{: .highlight } +Some functions will handle more than one endpoint and the numbers below show the total endpoints **not** the total functions + +| **Method** | **Endpoint Count** | +|------------|---------------------| +| DELETE | 0 | +| GET | 0 | +| POST | 0 | +| PUT | 0 | + +Have a look around and if you would like to contribute please read over the [Contributing guide](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) diff --git a/docs/site/berry/DELETE.md b/docs/site/berry/DELETE.md new file mode 100644 index 0000000..f0d69c8 --- /dev/null +++ b/docs/site/berry/DELETE.md @@ -0,0 +1,5 @@ +--- +title: DELETE +parent: berry +has_children: true +--- diff --git a/docs/site/berry/GET.md b/docs/site/berry/GET.md new file mode 100644 index 0000000..431ef63 --- /dev/null +++ b/docs/site/berry/GET.md @@ -0,0 +1,5 @@ +--- +title: GET +parent: berry +has_children: true +--- diff --git a/docs/site/berry/Get-PokeBerry.md b/docs/site/berry/Get-PokeBerry.md new file mode 100644 index 0000000..fa99ef8 --- /dev/null +++ b/docs/site/berry/Get-PokeBerry.md @@ -0,0 +1,173 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: berry +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerry.html +parent: GET +schema: 2.0.0 +title: Get-PokeBerry +--- + +# Get-PokeBerry + +## SYNOPSIS +Gets pokemon forms from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeBerry [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeBerry -id [] +``` + +### index_ByName +```powershell +Get-PokeBerry -name [] +``` + +## DESCRIPTION +The Get-PokeBerry cmdlet gets pokemon forms from PokeAPI + +Some Pokemon may appear in one of multiple, visually different forms. +These differences are purely cosmetic. +For variations within a Pokemon species, +which do differ in more than just visuals, the +'Pokemon' entity is used to represent such a variety. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeBerry +``` + +Gets the first 20 pokemon forms sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeBerry -id 1 +``` + +Gets the pokemon form with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeBerry -name ditto +``` + +Gets the pokemon form with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeBerry -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokeBerry.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokeBerry.html) + diff --git a/docs/site/berry/Get-PokeBerryFirmness.md b/docs/site/berry/Get-PokeBerryFirmness.md new file mode 100644 index 0000000..a9490b7 --- /dev/null +++ b/docs/site/berry/Get-PokeBerryFirmness.md @@ -0,0 +1,170 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: berry +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerryFirmness.html +parent: GET +schema: 2.0.0 +title: Get-PokeBerryFirmness +--- + +# Get-PokeBerryFirmness + +## SYNOPSIS +Gets the firmness of berries from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeBerryFirmness [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeBerryFirmness -id [] +``` + +### index_ByName +```powershell +Get-PokeBerryFirmness -name [] +``` + +## DESCRIPTION +The Get-PokeBerryFirmness cmdlet gets the firmness of +berries from PokeAPI + +Berries can be soft or hard + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeBerryFirmness +``` + +Gets the first 20 berry firmness sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeBerryFirmness -id 1 +``` + +Gets the berry firmness with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeBerryFirmness -name ditto +``` + +Gets the berry firmness with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeBerryFirmness -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerryFirmness.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerryFirmness.html) + diff --git a/docs/site/berry/Get-PokeBerryFlavor.md b/docs/site/berry/Get-PokeBerryFlavor.md new file mode 100644 index 0000000..1894cf7 --- /dev/null +++ b/docs/site/berry/Get-PokeBerryFlavor.md @@ -0,0 +1,170 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: berry +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerryFlavor.html +parent: GET +schema: 2.0.0 +title: Get-PokeBerryFlavor +--- + +# Get-PokeBerryFlavor + +## SYNOPSIS +Gets berry flavor from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeBerryFlavor [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeBerryFlavor -id [] +``` + +### index_ByName +```powershell +Get-PokeBerryFlavor -name [] +``` + +## DESCRIPTION +The Get-PokeBerryFlavor cmdlet gets berry flavor from PokeAPI + +Flavors determine whether a Pokemon will benefit or suffer +from eating a berry based on their nature + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeBerryFlavor +``` + +Gets the first 20 berry flavors sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeBerryFlavor -id 1 +``` + +Gets the berry flavor with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeBerryFlavor -name ditto +``` + +Gets the berry flavor with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeBerryFlavor -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerryFlavor.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/berry/Get-PokeBerryFlavor.html) + diff --git a/docs/site/berry/POST.md b/docs/site/berry/POST.md new file mode 100644 index 0000000..59a7a08 --- /dev/null +++ b/docs/site/berry/POST.md @@ -0,0 +1,5 @@ +--- +title: POST +parent: berry +has_children: true +--- diff --git a/docs/site/berry/PUT.md b/docs/site/berry/PUT.md new file mode 100644 index 0000000..cbeac5e --- /dev/null +++ b/docs/site/berry/PUT.md @@ -0,0 +1,5 @@ +--- +title: PUT +parent: berry +has_children: true +--- diff --git a/docs/site/berry/index.md b/docs/site/berry/index.md new file mode 100644 index 0000000..d1b0631 --- /dev/null +++ b/docs/site/berry/index.md @@ -0,0 +1,18 @@ +--- +title: berry +has_children: true +--- + +## berry - endpoint help & documentation + +{: .highlight } +Some functions will handle more than one endpoint and the numbers below show the total endpoints **not** the total functions + +| **Method** | **Endpoint Count** | +|------------|---------------------| +| DELETE | 0 | +| GET | 6 | +| POST | 0 | +| PUT | 0 | + +Have a look around and if you would like to contribute please read over the [Contributing guide](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) diff --git a/docs/site/contest/DELETE.md b/docs/site/contest/DELETE.md new file mode 100644 index 0000000..486d7fa --- /dev/null +++ b/docs/site/contest/DELETE.md @@ -0,0 +1,5 @@ +--- +title: DELETE +parent: contest +has_children: true +--- diff --git a/docs/site/contest/GET.md b/docs/site/contest/GET.md new file mode 100644 index 0000000..c5c28f9 --- /dev/null +++ b/docs/site/contest/GET.md @@ -0,0 +1,5 @@ +--- +title: GET +parent: contest +has_children: true +--- diff --git a/docs/site/contest/Get-PokeContestEffect.md b/docs/site/contest/Get-PokeContestEffect.md new file mode 100644 index 0000000..7af6a62 --- /dev/null +++ b/docs/site/contest/Get-PokeContestEffect.md @@ -0,0 +1,169 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: contest +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestEffect.html +parent: GET +schema: 2.0.0 +title: Get-PokeContestEffect +--- + +# Get-PokeContestEffect + +## SYNOPSIS +Gets contest effects from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeContestEffect [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeContestEffect -id [] +``` + +### index_ByName +```powershell +Get-PokeContestEffect -name [] +``` + +## DESCRIPTION +The Get-PokeContestEffect cmdlet gets contest effects from PokeAPI + +Contest effects refer to the effects of moves when used in contests + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeContestEffect +``` + +Gets the first 20 contest effects sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeContestEffect -id 1 +``` + +Gets the contest effect with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeContestEffect -name ditto +``` + +Gets the contest effect with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeContestEffect -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestEffect.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestEffect.html) + diff --git a/docs/site/contest/Get-PokeContestSuperEffect.md b/docs/site/contest/Get-PokeContestSuperEffect.md new file mode 100644 index 0000000..fe76071 --- /dev/null +++ b/docs/site/contest/Get-PokeContestSuperEffect.md @@ -0,0 +1,171 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: contest +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestSuperEffect.html +parent: GET +schema: 2.0.0 +title: Get-PokeContestSuperEffect +--- + +# Get-PokeContestSuperEffect + +## SYNOPSIS +Gets super contest effects from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeContestSuperEffect [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeContestSuperEffect -id [] +``` + +### index_ByName +```powershell +Get-PokeContestSuperEffect -name [] +``` + +## DESCRIPTION +The Get-PokeContestSuperEffect cmdlet gets super contest effects +from PokeAPI + +Super contest effects refer to the effects of moves when +used in super contests + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeContestSuperEffect +``` + +Gets the first 20 super contest effects sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeContestSuperEffect -id 1 +``` + +Gets the super contest effect with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeContestSuperEffect -name ditto +``` + +Gets the super contest effect with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeContestSuperEffect -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestSuperEffect.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestSuperEffect.html) + diff --git a/docs/site/contest/Get-PokeContestType.md b/docs/site/contest/Get-PokeContestType.md new file mode 100644 index 0000000..31dbb67 --- /dev/null +++ b/docs/site/contest/Get-PokeContestType.md @@ -0,0 +1,170 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: contest +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestType.html +parent: GET +schema: 2.0.0 +title: Get-PokeContestType +--- + +# Get-PokeContestType + +## SYNOPSIS +Gets contest types from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeContestType [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeContestType -id [] +``` + +### index_ByName +```powershell +Get-PokeContestType -name [] +``` + +## DESCRIPTION +The Get-PokeContestType cmdlet gets contest types from PokeAPI + +Contest types are categories judges used to weigh a +Pokemon's condition in Pokemon contests. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeContestType +``` + +Gets the first 20 contest types sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeContestType -id 1 +``` + +Gets the contest type with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeContestType -name ditto +``` + +Gets the contest type with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeContestType -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestType.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/contest/Get-PokeContestType.html) + diff --git a/docs/site/contest/POST.md b/docs/site/contest/POST.md new file mode 100644 index 0000000..3c555fd --- /dev/null +++ b/docs/site/contest/POST.md @@ -0,0 +1,5 @@ +--- +title: POST +parent: contest +has_children: true +--- diff --git a/docs/site/contest/PUT.md b/docs/site/contest/PUT.md new file mode 100644 index 0000000..542b109 --- /dev/null +++ b/docs/site/contest/PUT.md @@ -0,0 +1,5 @@ +--- +title: PUT +parent: contest +has_children: true +--- diff --git a/docs/site/contest/index.md b/docs/site/contest/index.md new file mode 100644 index 0000000..45b6d32 --- /dev/null +++ b/docs/site/contest/index.md @@ -0,0 +1,18 @@ +--- +title: contest +has_children: true +--- + +## contest - endpoint help & documentation + +{: .highlight } +Some functions will handle more than one endpoint and the numbers below show the total endpoints **not** the total functions + +| **Method** | **Endpoint Count** | +|------------|---------------------| +| DELETE | 0 | +| GET | 6 | +| POST | 0 | +| PUT | 0 | + +Have a look around and if you would like to contribute please read over the [Contributing guide](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) diff --git a/docs/site/encounter/DELETE.md b/docs/site/encounter/DELETE.md new file mode 100644 index 0000000..7700f2b --- /dev/null +++ b/docs/site/encounter/DELETE.md @@ -0,0 +1,5 @@ +--- +title: DELETE +parent: encounter +has_children: true +--- diff --git a/docs/site/encounter/GET.md b/docs/site/encounter/GET.md new file mode 100644 index 0000000..23d34bd --- /dev/null +++ b/docs/site/encounter/GET.md @@ -0,0 +1,5 @@ +--- +title: GET +parent: encounter +has_children: true +--- diff --git a/docs/site/encounter/Get-PokeEncounterCondition.md b/docs/site/encounter/Get-PokeEncounterCondition.md new file mode 100644 index 0000000..2742b5e --- /dev/null +++ b/docs/site/encounter/Get-PokeEncounterCondition.md @@ -0,0 +1,170 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: encounter +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterCondition.html +parent: GET +schema: 2.0.0 +title: Get-PokeEncounterCondition +--- + +# Get-PokeEncounterCondition + +## SYNOPSIS +Gets encounter conditions from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeEncounterCondition [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeEncounterCondition -id [] +``` + +### index_ByName +```powershell +Get-PokeEncounterCondition -name [] +``` + +## DESCRIPTION +The Get-PokeEncounterCondition cmdlet gets encounter conditions from PokeAPI + +Conditions which affect what pokemon might appear in the +wild, e.g., day or night. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeEncounterCondition +``` + +Gets the first 20 encounter conditions sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeEncounterCondition -id 1 +``` + +Gets the encounter condition with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeEncounterCondition -name ditto +``` + +Gets the encounter condition with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeEncounterCondition -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterCondition.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterCondition.html) + diff --git a/docs/site/encounter/Get-PokeEncounterConditionValue.md b/docs/site/encounter/Get-PokeEncounterConditionValue.md new file mode 100644 index 0000000..83f7109 --- /dev/null +++ b/docs/site/encounter/Get-PokeEncounterConditionValue.md @@ -0,0 +1,171 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: encounter +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterConditionValue.html +parent: GET +schema: 2.0.0 +title: Get-PokeEncounterConditionValue +--- + +# Get-PokeEncounterConditionValue + +## SYNOPSIS +Gets encounter condition values from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeEncounterConditionValue [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeEncounterConditionValue -id [] +``` + +### index_ByName +```powershell +Get-PokeEncounterConditionValue -name [] +``` + +## DESCRIPTION +The Get-PokeEncounterConditionValue cmdlet gets encounter condition values +from PokeAPI + +Encounter condition values are the various states that an encounter +condition can have, i.e., time of day can be either day or night. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeEncounterConditionValue +``` + +Gets the first 20 encounter condition values sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeEncounterConditionValue -id 1 +``` + +Gets the encounter condition value with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeEncounterConditionValue -name ditto +``` + +Gets the encounter condition value with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeEncounterConditionValue -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterConditionValue.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterConditionValue.html) + diff --git a/docs/site/encounter/Get-PokeEncounterMethod.md b/docs/site/encounter/Get-PokeEncounterMethod.md new file mode 100644 index 0000000..4ee8619 --- /dev/null +++ b/docs/site/encounter/Get-PokeEncounterMethod.md @@ -0,0 +1,170 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: encounter +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterMethod.html +parent: GET +schema: 2.0.0 +title: Get-PokeEncounterMethod +--- + +# Get-PokeEncounterMethod + +## SYNOPSIS +Gets encounter methods from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeEncounterMethod [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeEncounterMethod -id [] +``` + +### index_ByName +```powershell +Get-PokeEncounterMethod -name [] +``` + +## DESCRIPTION +The Get-PokeEncounterMethod cmdlet gets encounter methods from PokeAPI + +Methods by which the player might can encounter Pokemon in the wild, +e.g., walking in tall grass + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeEncounterMethod +``` + +Gets the first 20 encounter methods sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeEncounterMethod -id 1 +``` + +Gets the encounter method with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeEncounterMethod -name ditto +``` + +Gets the encounter method with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeEncounterMethod -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterMethod.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/encounter/Get-PokeEncounterMethod.html) + diff --git a/docs/site/encounter/POST.md b/docs/site/encounter/POST.md new file mode 100644 index 0000000..11792b1 --- /dev/null +++ b/docs/site/encounter/POST.md @@ -0,0 +1,5 @@ +--- +title: POST +parent: encounter +has_children: true +--- diff --git a/docs/site/encounter/PUT.md b/docs/site/encounter/PUT.md new file mode 100644 index 0000000..9e3d5c2 --- /dev/null +++ b/docs/site/encounter/PUT.md @@ -0,0 +1,5 @@ +--- +title: PUT +parent: encounter +has_children: true +--- diff --git a/docs/site/encounter/index.md b/docs/site/encounter/index.md new file mode 100644 index 0000000..93c2201 --- /dev/null +++ b/docs/site/encounter/index.md @@ -0,0 +1,18 @@ +--- +title: encounter +has_children: true +--- + +## encounter - endpoint help & documentation + +{: .highlight } +Some functions will handle more than one endpoint and the numbers below show the total endpoints **not** the total functions + +| **Method** | **Endpoint Count** | +|------------|---------------------| +| DELETE | 0 | +| GET | 6 | +| POST | 0 | +| PUT | 0 | + +Have a look around and if you would like to contribute please read over the [Contributing guide](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) diff --git a/docs/site/evolution/DELETE.md b/docs/site/evolution/DELETE.md new file mode 100644 index 0000000..9343358 --- /dev/null +++ b/docs/site/evolution/DELETE.md @@ -0,0 +1,5 @@ +--- +title: DELETE +parent: evolution +has_children: true +--- diff --git a/docs/site/evolution/GET.md b/docs/site/evolution/GET.md new file mode 100644 index 0000000..1b542b0 --- /dev/null +++ b/docs/site/evolution/GET.md @@ -0,0 +1,5 @@ +--- +title: GET +parent: evolution +has_children: true +--- diff --git a/docs/site/evolution/Get-PokeEvolutionChain.md b/docs/site/evolution/Get-PokeEvolutionChain.md new file mode 100644 index 0000000..856498b --- /dev/null +++ b/docs/site/evolution/Get-PokeEvolutionChain.md @@ -0,0 +1,172 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: evolution +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/evolution/Get-PokeEvolutionChain.html +parent: GET +schema: 2.0.0 +title: Get-PokeEvolutionChain +--- + +# Get-PokeEvolutionChain + +## SYNOPSIS +Gets evolution chains from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeEvolutionChain [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeEvolutionChain -id [] +``` + +### index_ByName +```powershell +Get-PokeEvolutionChain -name [] +``` + +## DESCRIPTION +The Get-PokeEvolutionChain cmdlet gets evolution chains from PokeAPI + +Evolution chains are essentially family trees. +They start with the lowest stage +within a family and detail evolution conditions for each as well as Pokemon +they can evolve into up through the hierarchy. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeEvolutionChain +``` + +Gets the first 20 evolution chains sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeEvolutionChain -id 1 +``` + +Gets the evolution chain with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeEvolutionChain -name ditto +``` + +Gets the evolution chain with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeEvolutionChain -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/evolution/Get-PokeEvolutionChain.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/evolution/Get-PokeEvolutionChain.html) + diff --git a/docs/site/evolution/Get-PokeEvolutionTrigger.md b/docs/site/evolution/Get-PokeEvolutionTrigger.md new file mode 100644 index 0000000..60ce2ae --- /dev/null +++ b/docs/site/evolution/Get-PokeEvolutionTrigger.md @@ -0,0 +1,169 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: evolution +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/evolution/Get-PokeEvolutionTrigger.html +parent: GET +schema: 2.0.0 +title: Get-PokeEvolutionTrigger +--- + +# Get-PokeEvolutionTrigger + +## SYNOPSIS +Gets evolution triggers from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeEvolutionTrigger [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeEvolutionTrigger -id [] +``` + +### index_ByName +```powershell +Get-PokeEvolutionTrigger -name [] +``` + +## DESCRIPTION +The Get-PokeEvolutionTrigger cmdlet gets evolution triggers from PokeAPI + +Evolution triggers are the events and conditions that cause a Pokemon to evolve + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeEvolutionTrigger +``` + +Gets the first 20 evolution triggers sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeEvolutionTrigger -id 1 +``` + +Gets the evolution trigger with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeEvolutionTrigger -name ditto +``` + +Gets the evolution trigger with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeEvolutionTrigger -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/evolution/Get-PokeEvolutionTrigger.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/evolution/Get-PokeEvolutionTrigger.html) + diff --git a/docs/site/evolution/POST.md b/docs/site/evolution/POST.md new file mode 100644 index 0000000..b5110a6 --- /dev/null +++ b/docs/site/evolution/POST.md @@ -0,0 +1,5 @@ +--- +title: POST +parent: evolution +has_children: true +--- diff --git a/docs/site/evolution/PUT.md b/docs/site/evolution/PUT.md new file mode 100644 index 0000000..28f19c8 --- /dev/null +++ b/docs/site/evolution/PUT.md @@ -0,0 +1,5 @@ +--- +title: PUT +parent: evolution +has_children: true +--- diff --git a/docs/site/evolution/index.md b/docs/site/evolution/index.md new file mode 100644 index 0000000..d5c4ad8 --- /dev/null +++ b/docs/site/evolution/index.md @@ -0,0 +1,18 @@ +--- +title: evolution +has_children: true +--- + +## evolution - endpoint help & documentation + +{: .highlight } +Some functions will handle more than one endpoint and the numbers below show the total endpoints **not** the total functions + +| **Method** | **Endpoint Count** | +|------------|---------------------| +| DELETE | 0 | +| GET | 4 | +| POST | 0 | +| PUT | 0 | + +Have a look around and if you would like to contribute please read over the [Contributing guide](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) diff --git a/docs/site/game/DELETE.md b/docs/site/game/DELETE.md new file mode 100644 index 0000000..8521098 --- /dev/null +++ b/docs/site/game/DELETE.md @@ -0,0 +1,5 @@ +--- +title: DELETE +parent: game +has_children: true +--- diff --git a/docs/site/game/GET.md b/docs/site/game/GET.md new file mode 100644 index 0000000..a85db7d --- /dev/null +++ b/docs/site/game/GET.md @@ -0,0 +1,5 @@ +--- +title: GET +parent: game +has_children: true +--- diff --git a/docs/site/game/Get-PokeGameGeneration.md b/docs/site/game/Get-PokeGameGeneration.md new file mode 100644 index 0000000..5821430 --- /dev/null +++ b/docs/site/game/Get-PokeGameGeneration.md @@ -0,0 +1,173 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: game +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameGeneration.html +parent: GET +schema: 2.0.0 +title: Get-PokeGameGeneration +--- + +# Get-PokeGameGeneration + +## SYNOPSIS +Gets game generations from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeGameGeneration [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeGameGeneration -id [] +``` + +### index_ByName +```powershell +Get-PokeGameGeneration -name [] +``` + +## DESCRIPTION +The Get-PokeGameGeneration cmdlet gets game generations from PokeAPI + +A generation is a grouping of the Pokemon games that separates them based +on the Pokemon they include. + +In each generation, a new set of Pokemon, Moves, Abilities and Types that +did not exist in the previous generation are released. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeGameGeneration +``` + +Gets the first 20 game generations sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeGameGeneration -id 1 +``` + +Gets the game generation with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeGameGeneration -name ditto +``` + +Gets the game generation with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeGameGeneration -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameGeneration.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameGeneration.html) + diff --git a/docs/site/game/Get-PokeGamePokedex.md b/docs/site/game/Get-PokeGamePokedex.md new file mode 100644 index 0000000..4c88357 --- /dev/null +++ b/docs/site/game/Get-PokeGamePokedex.md @@ -0,0 +1,171 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: game +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGamePokedex.html +parent: GET +schema: 2.0.0 +title: Get-PokeGamePokedex +--- + +# Get-PokeGamePokedex + +## SYNOPSIS +Gets game pokedexes from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeGamePokedex [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeGamePokedex -id [] +``` + +### index_ByName +```powershell +Get-PokeGamePokedex -name [] +``` + +## DESCRIPTION +The Get-PokeGamePokedex cmdlet gets game pokedexes from PokeAPI + +A Pokedex is a handheld electronic encyclopedia device; one which is capable of +recording and retaining information of the various Pokemon in a given region with the +exception of the national dex and some smaller dexes related to portions of a region + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeGamePokedex +``` + +Gets the first 20 game pokedexes sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeGamePokedex -id 1 +``` + +Gets the game pokedex with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeGamePokedex -name ditto +``` + +Gets the game pokedex with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeGamePokedex -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGamePokedex.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGamePokedex.html) + diff --git a/docs/site/game/Get-PokeGameVersion.md b/docs/site/game/Get-PokeGameVersion.md new file mode 100644 index 0000000..e87e823 --- /dev/null +++ b/docs/site/game/Get-PokeGameVersion.md @@ -0,0 +1,169 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: game +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameVersion.html +parent: GET +schema: 2.0.0 +title: Get-PokeGameVersion +--- + +# Get-PokeGameVersion + +## SYNOPSIS +Gets game versions from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeGameVersion [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeGameVersion -id [] +``` + +### index_ByName +```powershell +Get-PokeGameVersion -name [] +``` + +## DESCRIPTION +The Get-PokeGameVersion cmdlet gets game versions from PokeAPI + +Versions of the games, e.g., Red, Blue or Yellow + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeGameVersion +``` + +Gets the first 20 game versions sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeGameVersion -id 1 +``` + +Gets the game version with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeGameVersion -name ditto +``` + +Gets the game version with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeGameVersion -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameVersion.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameVersion.html) + diff --git a/docs/site/game/Get-PokeGameVersionGroup.md b/docs/site/game/Get-PokeGameVersionGroup.md new file mode 100644 index 0000000..d57beed --- /dev/null +++ b/docs/site/game/Get-PokeGameVersionGroup.md @@ -0,0 +1,170 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: game +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameVersionGroup.html +parent: GET +schema: 2.0.0 +title: Get-PokeGameVersionGroup +--- + +# Get-PokeGameVersionGroup + +## SYNOPSIS +Gets game version groups from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeGameVersionGroup [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeGameVersionGroup -id [] +``` + +### index_ByName +```powershell +Get-PokeGameVersionGroup -name [] +``` + +## DESCRIPTION +The Get-PokeGameVersionGroup cmdlet gets game version groups +from PokeAPI + +Version groups categorize highly similar versions of the games + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeGameVersionGroup +``` + +Gets the first 20 game version groups sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeGameVersionGroup -id 1 +``` + +Gets the game version group with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeGameVersionGroup -name ditto +``` + +Gets the game version group with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeGameVersionGroup -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameVersionGroup.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/game/Get-PokeGameVersionGroup.html) + diff --git a/docs/site/game/POST.md b/docs/site/game/POST.md new file mode 100644 index 0000000..9443de0 --- /dev/null +++ b/docs/site/game/POST.md @@ -0,0 +1,5 @@ +--- +title: POST +parent: game +has_children: true +--- diff --git a/docs/site/game/PUT.md b/docs/site/game/PUT.md new file mode 100644 index 0000000..79e3436 --- /dev/null +++ b/docs/site/game/PUT.md @@ -0,0 +1,5 @@ +--- +title: PUT +parent: game +has_children: true +--- diff --git a/docs/site/game/index.md b/docs/site/game/index.md new file mode 100644 index 0000000..33be207 --- /dev/null +++ b/docs/site/game/index.md @@ -0,0 +1,18 @@ +--- +title: game +has_children: true +--- + +## game - endpoint help & documentation + +{: .highlight } +Some functions will handle more than one endpoint and the numbers below show the total endpoints **not** the total functions + +| **Method** | **Endpoint Count** | +|------------|---------------------| +| DELETE | 0 | +| GET | 8 | +| POST | 0 | +| PUT | 0 | + +Have a look around and if you would like to contribute please read over the [Contributing guide](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) diff --git a/docs/site/item/DELETE.md b/docs/site/item/DELETE.md new file mode 100644 index 0000000..59775e6 --- /dev/null +++ b/docs/site/item/DELETE.md @@ -0,0 +1,5 @@ +--- +title: DELETE +parent: item +has_children: true +--- diff --git a/docs/site/item/GET.md b/docs/site/item/GET.md new file mode 100644 index 0000000..6f7acc4 --- /dev/null +++ b/docs/site/item/GET.md @@ -0,0 +1,5 @@ +--- +title: GET +parent: item +has_children: true +--- diff --git a/docs/site/item/Get-PokeItem.md b/docs/site/item/Get-PokeItem.md new file mode 100644 index 0000000..80b4c06 --- /dev/null +++ b/docs/site/item/Get-PokeItem.md @@ -0,0 +1,173 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: item +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItem.html +parent: GET +schema: 2.0.0 +title: Get-PokeItem +--- + +# Get-PokeItem + +## SYNOPSIS +Gets items from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeItem [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeItem -id [] +``` + +### index_ByName +```powershell +Get-PokeItem -name [] +``` + +## DESCRIPTION +The Get-PokeItem cmdlet gets items from PokeAPI + +An item is an object in the games which the player can pick up, +keep in their bag, and use in some manner + +They have various uses, including healing, powering up, helping catch +Pokemon, or to access a new area + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeItem +``` + +Gets the first 20 items sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeItem -id 1 +``` + +Gets the item with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeItem -name ditto +``` + +Gets the item with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeItem -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItem.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItem.html) + diff --git a/docs/site/item/Get-PokeItemAttribute.md b/docs/site/item/Get-PokeItemAttribute.md new file mode 100644 index 0000000..b389f22 --- /dev/null +++ b/docs/site/item/Get-PokeItemAttribute.md @@ -0,0 +1,171 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: item +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemAttribute.html +parent: GET +schema: 2.0.0 +title: Get-PokeItemAttribute +--- + +# Get-PokeItemAttribute + +## SYNOPSIS +Gets item attributes from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeItemAttribute [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeItemAttribute -id [] +``` + +### index_ByName +```powershell +Get-PokeItemAttribute -name [] +``` + +## DESCRIPTION +The Get-PokeItemAttribute cmdlet gets item attributes from PokeAPI + +Item attributes define particular aspects of items, +e.g. +"usable in battle" or "consumable" + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeItemAttribute +``` + +Gets the first 20 item attributes sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeItemAttribute -id 1 +``` + +Gets the item attribute with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeItemAttribute -name ditto +``` + +Gets the item attribute with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeItemAttribute -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemAttribute.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemAttribute.html) + diff --git a/docs/site/item/Get-PokeItemCategory.md b/docs/site/item/Get-PokeItemCategory.md new file mode 100644 index 0000000..2d4666e --- /dev/null +++ b/docs/site/item/Get-PokeItemCategory.md @@ -0,0 +1,169 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: item +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemCategory.html +parent: GET +schema: 2.0.0 +title: Get-PokeItemCategory +--- + +# Get-PokeItemCategory + +## SYNOPSIS +Gets item categories from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeItemCategory [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeItemCategory -id [] +``` + +### index_ByName +```powershell +Get-PokeItemCategory -name [] +``` + +## DESCRIPTION +The Get-PokeItemCategory cmdlet gets item categories from PokeAPI + +Item categories determine where items will be placed in the players bag + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeItemCategory +``` + +Gets the first 20 item categories sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeItemCategory -id 1 +``` + +Gets the item category with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeItemCategory -name ditto +``` + +Gets the item category with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeItemCategory -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemCategory.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemCategory.html) + diff --git a/docs/site/item/Get-PokeItemFlingEffect.md b/docs/site/item/Get-PokeItemFlingEffect.md new file mode 100644 index 0000000..5619d4c --- /dev/null +++ b/docs/site/item/Get-PokeItemFlingEffect.md @@ -0,0 +1,169 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: item +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemFlingEffect.html +parent: GET +schema: 2.0.0 +title: Get-PokeItemFlingEffect +--- + +# Get-PokeItemFlingEffect + +## SYNOPSIS +Gets item fling effects from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeItemFlingEffect [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeItemFlingEffect -id [] +``` + +### index_ByName +```powershell +Get-PokeItemFlingEffect -name [] +``` + +## DESCRIPTION +The Get-PokeItemFlingEffect cmdlet gets item fling effects from PokeAPI + +The various effects of the move "Fling" when used with different items + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeItemFlingEffect +``` + +Gets the first 20 item fling effects sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeItemFlingEffect -id 1 +``` + +Gets the item fling effect with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeItemFlingEffect -name ditto +``` + +Gets the item fling effect with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeItemFlingEffect -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemFlingEffect.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemFlingEffect.html) + diff --git a/docs/site/item/Get-PokeItemPocket.md b/docs/site/item/Get-PokeItemPocket.md new file mode 100644 index 0000000..f1f51b0 --- /dev/null +++ b/docs/site/item/Get-PokeItemPocket.md @@ -0,0 +1,169 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: item +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemPocket.html +parent: GET +schema: 2.0.0 +title: Get-PokeItemPocket +--- + +# Get-PokeItemPocket + +## SYNOPSIS +Gets item pockets from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeItemPocket [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeItemPocket -id [] +``` + +### index_ByName +```powershell +Get-PokeItemPocket -name [] +``` + +## DESCRIPTION +The Get-PokeItemPocket cmdlet gets item pockets from PokeAPI + +Pockets within the players bag used for storing items by category + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeItemPocket +``` + +Gets the first 20 item pockets sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeItemPocket -id 1 +``` + +Gets the item pocket with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeItemPocket -name ditto +``` + +Gets the item pocket with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeItemPocket -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemPocket.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/item/Get-PokeItemPocket.html) + diff --git a/docs/site/item/POST.md b/docs/site/item/POST.md new file mode 100644 index 0000000..1420318 --- /dev/null +++ b/docs/site/item/POST.md @@ -0,0 +1,5 @@ +--- +title: POST +parent: item +has_children: true +--- diff --git a/docs/site/item/PUT.md b/docs/site/item/PUT.md new file mode 100644 index 0000000..7e5be6b --- /dev/null +++ b/docs/site/item/PUT.md @@ -0,0 +1,5 @@ +--- +title: PUT +parent: item +has_children: true +--- diff --git a/docs/site/item/index.md b/docs/site/item/index.md new file mode 100644 index 0000000..6a86d9f --- /dev/null +++ b/docs/site/item/index.md @@ -0,0 +1,18 @@ +--- +title: item +has_children: true +--- + +## item - endpoint help & documentation + +{: .highlight } +Some functions will handle more than one endpoint and the numbers below show the total endpoints **not** the total functions + +| **Method** | **Endpoint Count** | +|------------|---------------------| +| DELETE | 0 | +| GET | 10 | +| POST | 0 | +| PUT | 0 | + +Have a look around and if you would like to contribute please read over the [Contributing guide](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) diff --git a/docs/site/location/DELETE.md b/docs/site/location/DELETE.md new file mode 100644 index 0000000..34694c0 --- /dev/null +++ b/docs/site/location/DELETE.md @@ -0,0 +1,5 @@ +--- +title: DELETE +parent: location +has_children: true +--- diff --git a/docs/site/location/GET.md b/docs/site/location/GET.md new file mode 100644 index 0000000..ed6e004 --- /dev/null +++ b/docs/site/location/GET.md @@ -0,0 +1,5 @@ +--- +title: GET +parent: location +has_children: true +--- diff --git a/docs/site/location/Get-PokeLocation.md b/docs/site/location/Get-PokeLocation.md new file mode 100644 index 0000000..e664291 --- /dev/null +++ b/docs/site/location/Get-PokeLocation.md @@ -0,0 +1,171 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: location +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocation.html +parent: GET +schema: 2.0.0 +title: Get-PokeLocation +--- + +# Get-PokeLocation + +## SYNOPSIS +Gets locations from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeLocation [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeLocation -id [] +``` + +### index_ByName +```powershell +Get-PokeLocation -name [] +``` + +## DESCRIPTION +The Get-PokeLocation cmdlet gets locations from PokeAPI + +Locations that can be visited within the games + +Locations make up sizable portions of regions, like cities or routes + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeLocation +``` + +Gets the first 20 locations sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeLocation -id 1 +``` + +Gets the location with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeLocation -name ditto +``` + +Gets the location with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeLocation -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocation.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocation.html) + diff --git a/docs/site/location/Get-PokeLocationArea.md b/docs/site/location/Get-PokeLocationArea.md new file mode 100644 index 0000000..19d2f78 --- /dev/null +++ b/docs/site/location/Get-PokeLocationArea.md @@ -0,0 +1,171 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: location +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationArea.html +parent: GET +schema: 2.0.0 +title: Get-PokeLocationArea +--- + +# Get-PokeLocationArea + +## SYNOPSIS +Gets location areas from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeLocationArea [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeLocationArea -id [] +``` + +### index_ByName +```powershell +Get-PokeLocationArea -name [] +``` + +## DESCRIPTION +The Get-PokeLocationArea cmdlet gets location areas from PokeAPI + +Location areas are sections of areas, such as floors in a building or cave + +Each area has its own set of possible Pokemon encounters + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeLocationArea +``` + +Gets the first 20 location areas sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeLocationArea -id 1 +``` + +Gets the location area with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeLocationArea -name ditto +``` + +Gets the location area with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeLocationArea -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationArea.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationArea.html) + diff --git a/docs/site/location/Get-PokeLocationPalParkArea.md b/docs/site/location/Get-PokeLocationPalParkArea.md new file mode 100644 index 0000000..be1d2ca --- /dev/null +++ b/docs/site/location/Get-PokeLocationPalParkArea.md @@ -0,0 +1,171 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: location +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationPalParkArea.html +parent: GET +schema: 2.0.0 +title: Get-PokeLocationPalParkArea +--- + +# Get-PokeLocationPalParkArea + +## SYNOPSIS +Gets pal park areas from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeLocationPalParkArea [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeLocationPalParkArea -id [] +``` + +### index_ByName +```powershell +Get-PokeLocationPalParkArea -name [] +``` + +## DESCRIPTION +The Get-PokeLocationPalParkArea cmdlet gets pal park areas from PokeAPI + +Areas used for grouping Pokemon encounters in Pal Park + +They're like habitats that are specific to Pal Park + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeLocationPalParkArea +``` + +Gets the first 20 pal park areas sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeLocationPalParkArea -id 1 +``` + +Gets the pal park area with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeLocationPalParkArea -name ditto +``` + +Gets the pal park area with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeLocationPalParkArea -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationPalParkArea.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationPalParkArea.html) + diff --git a/docs/site/location/Get-PokeLocationRegion.md b/docs/site/location/Get-PokeLocationRegion.md new file mode 100644 index 0000000..3d17f92 --- /dev/null +++ b/docs/site/location/Get-PokeLocationRegion.md @@ -0,0 +1,172 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: location +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationRegion.html +parent: GET +schema: 2.0.0 +title: Get-PokeLocationRegion +--- + +# Get-PokeLocationRegion + +## SYNOPSIS +Gets regions from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeLocationRegion [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeLocationRegion -id [] +``` + +### index_ByName +```powershell +Get-PokeLocationRegion -name [] +``` + +## DESCRIPTION +The Get-PokeLocationRegion cmdlet gets regions from PokeAPI + +A region is an organized area of the Pokemon world + +Most often, the main difference between regions is the species of +Pokemon that can be encountered within them. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeLocationRegion +``` + +Gets the first 20 regions sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeLocationRegion -id 1 +``` + +Gets the region with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeLocationRegion -name ditto +``` + +Gets the region with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeLocationRegion -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationRegion.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/location/Get-PokeLocationRegion.html) + diff --git a/docs/site/location/POST.md b/docs/site/location/POST.md new file mode 100644 index 0000000..bebaca5 --- /dev/null +++ b/docs/site/location/POST.md @@ -0,0 +1,5 @@ +--- +title: POST +parent: location +has_children: true +--- diff --git a/docs/site/location/PUT.md b/docs/site/location/PUT.md new file mode 100644 index 0000000..8da5bad --- /dev/null +++ b/docs/site/location/PUT.md @@ -0,0 +1,5 @@ +--- +title: PUT +parent: location +has_children: true +--- diff --git a/docs/site/location/index.md b/docs/site/location/index.md new file mode 100644 index 0000000..e1a09ec --- /dev/null +++ b/docs/site/location/index.md @@ -0,0 +1,18 @@ +--- +title: location +has_children: true +--- + +## location - endpoint help & documentation + +{: .highlight } +Some functions will handle more than one endpoint and the numbers below show the total endpoints **not** the total functions + +| **Method** | **Endpoint Count** | +|------------|---------------------| +| DELETE | 0 | +| GET | 8 | +| POST | 0 | +| PUT | 0 | + +Have a look around and if you would like to contribute please read over the [Contributing guide](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) diff --git a/docs/site/machine/DELETE.md b/docs/site/machine/DELETE.md new file mode 100644 index 0000000..6dfa101 --- /dev/null +++ b/docs/site/machine/DELETE.md @@ -0,0 +1,5 @@ +--- +title: DELETE +parent: machine +has_children: true +--- diff --git a/docs/site/machine/GET.md b/docs/site/machine/GET.md new file mode 100644 index 0000000..7046d3a --- /dev/null +++ b/docs/site/machine/GET.md @@ -0,0 +1,5 @@ +--- +title: GET +parent: machine +has_children: true +--- diff --git a/docs/site/machine/Get-PokeMachine.md b/docs/site/machine/Get-PokeMachine.md new file mode 100644 index 0000000..ae650f5 --- /dev/null +++ b/docs/site/machine/Get-PokeMachine.md @@ -0,0 +1,145 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: machine +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/machine/Get-PokeMachine.html +parent: GET +schema: 2.0.0 +title: Get-PokeMachine +--- + +# Get-PokeMachine + +## SYNOPSIS +Gets machines from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeMachine [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeMachine -id [] +``` + +## DESCRIPTION +The Get-PokeMachine cmdlet gets machines from PokeAPI + +Machines are the representation of items that teach moves to Pokemon + +They vary from version to version, so it is not certain that one specific +TM or HM corresponds to a single Machine + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeMachine +``` + +Gets the first 20 machines sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeMachine -id 1 +``` + +Gets the machine with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeMachine -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/machine/Get-PokeMachine.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/machine/Get-PokeMachine.html) + diff --git a/docs/site/machine/POST.md b/docs/site/machine/POST.md new file mode 100644 index 0000000..b63c115 --- /dev/null +++ b/docs/site/machine/POST.md @@ -0,0 +1,5 @@ +--- +title: POST +parent: machine +has_children: true +--- diff --git a/docs/site/machine/PUT.md b/docs/site/machine/PUT.md new file mode 100644 index 0000000..a9ddfed --- /dev/null +++ b/docs/site/machine/PUT.md @@ -0,0 +1,5 @@ +--- +title: PUT +parent: machine +has_children: true +--- diff --git a/docs/site/machine/index.md b/docs/site/machine/index.md new file mode 100644 index 0000000..3005243 --- /dev/null +++ b/docs/site/machine/index.md @@ -0,0 +1,18 @@ +--- +title: machine +has_children: true +--- + +## machine - endpoint help & documentation + +{: .highlight } +Some functions will handle more than one endpoint and the numbers below show the total endpoints **not** the total functions + +| **Method** | **Endpoint Count** | +|------------|---------------------| +| DELETE | 0 | +| GET | 2 | +| POST | 0 | +| PUT | 0 | + +Have a look around and if you would like to contribute please read over the [Contributing guide](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) diff --git a/docs/site/move/DELETE.md b/docs/site/move/DELETE.md new file mode 100644 index 0000000..6773112 --- /dev/null +++ b/docs/site/move/DELETE.md @@ -0,0 +1,5 @@ +--- +title: DELETE +parent: move +has_children: true +--- diff --git a/docs/site/move/GET.md b/docs/site/move/GET.md new file mode 100644 index 0000000..6801b27 --- /dev/null +++ b/docs/site/move/GET.md @@ -0,0 +1,5 @@ +--- +title: GET +parent: move +has_children: true +--- diff --git a/docs/site/move/Get-PokeMove.md b/docs/site/move/Get-PokeMove.md new file mode 100644 index 0000000..736d1e0 --- /dev/null +++ b/docs/site/move/Get-PokeMove.md @@ -0,0 +1,173 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: move +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMove.html +parent: GET +schema: 2.0.0 +title: Get-PokeMove +--- + +# Get-PokeMove + +## SYNOPSIS +Gets moves from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeMove [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeMove -id [] +``` + +### index_ByName +```powershell +Get-PokeMove -name [] +``` + +## DESCRIPTION +The Get-PokeMove cmdlet gets moves from PokeAPI + +Moves are the skills of Pokemon in battle. +In battle, a Pokemon uses one move each turn. + +Some moves (including those learned by Hidden Machine) can be used outside of battle as well, +usually for the purpose of removing obstacles or exploring new areas. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeMove +``` + +Gets the first 20 moves sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeMove -id 1 +``` + +Gets the move with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeMove -name ditto +``` + +Gets the move with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeMove -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMove.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMove.html) + diff --git a/docs/site/move/Get-PokeMoveAilment.md b/docs/site/move/Get-PokeMoveAilment.md new file mode 100644 index 0000000..e3b53af --- /dev/null +++ b/docs/site/move/Get-PokeMoveAilment.md @@ -0,0 +1,169 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: move +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveAilment.html +parent: GET +schema: 2.0.0 +title: Get-PokeMoveAilment +--- + +# Get-PokeMoveAilment + +## SYNOPSIS +Gets move ailments from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeMoveAilment [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeMoveAilment -id [] +``` + +### index_ByName +```powershell +Get-PokeMoveAilment -name [] +``` + +## DESCRIPTION +The Get-PokeMoveAilment cmdlet gets move ailments from PokeAPI + +Move Ailments are status conditions caused by moves used during battle + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeMoveAilment +``` + +Gets the first 20 move ailments sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeMoveAilment -id 1 +``` + +Gets the move ailment with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeMoveAilment -name ditto +``` + +Gets the move ailment with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeMoveAilment -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveAilment.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveAilment.html) + diff --git a/docs/site/move/Get-PokeMoveBattleStyle.md b/docs/site/move/Get-PokeMoveBattleStyle.md new file mode 100644 index 0000000..4549c73 --- /dev/null +++ b/docs/site/move/Get-PokeMoveBattleStyle.md @@ -0,0 +1,169 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: move +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveBattleStyle.html +parent: GET +schema: 2.0.0 +title: Get-PokeMoveBattleStyle +--- + +# Get-PokeMoveBattleStyle + +## SYNOPSIS +Gets move battle styles from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeMoveBattleStyle [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeMoveBattleStyle -id [] +``` + +### index_ByName +```powershell +Get-PokeMoveBattleStyle -name [] +``` + +## DESCRIPTION +The Get-PokeMoveBattleStyle cmdlet gets move battle styles from PokeAPI + +Styles of moves when used in the Battle Palace + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeMoveBattleStyle +``` + +Gets the first 20 move battle styles sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeMoveBattleStyle -id 1 +``` + +Gets the move battle style with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeMoveBattleStyle -name ditto +``` + +Gets the move battle style with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeMoveBattleStyle -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveBattleStyle.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveBattleStyle.html) + diff --git a/docs/site/move/Get-PokeMoveCategory.md b/docs/site/move/Get-PokeMoveCategory.md new file mode 100644 index 0000000..ce877f3 --- /dev/null +++ b/docs/site/move/Get-PokeMoveCategory.md @@ -0,0 +1,169 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: move +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveCategory.html +parent: GET +schema: 2.0.0 +title: Get-PokeMoveCategory +--- + +# Get-PokeMoveCategory + +## SYNOPSIS +Gets move categories from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeMoveCategory [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeMoveCategory -id [] +``` + +### index_ByName +```powershell +Get-PokeMoveCategory -name [] +``` + +## DESCRIPTION +The Get-PokeMoveCategory cmdlet gets move categories from PokeAPI + +Very general categories that loosely group move effects + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeMoveCategory +``` + +Gets the first 20 move categories sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeMoveCategory -id 1 +``` + +Gets the move category with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeMoveCategory -name ditto +``` + +Gets the move category with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeMoveCategory -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveCategory.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveCategory.html) + diff --git a/docs/site/move/Get-PokeMoveDamageClass.md b/docs/site/move/Get-PokeMoveDamageClass.md new file mode 100644 index 0000000..13b6ba2 --- /dev/null +++ b/docs/site/move/Get-PokeMoveDamageClass.md @@ -0,0 +1,170 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: move +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveDamageClass.html +parent: GET +schema: 2.0.0 +title: Get-PokeMoveDamageClass +--- + +# Get-PokeMoveDamageClass + +## SYNOPSIS +Gets move damage classes from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeMoveDamageClass [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeMoveDamageClass -id [] +``` + +### index_ByName +```powershell +Get-PokeMoveDamageClass -name [] +``` + +## DESCRIPTION +The Get-PokeMoveDamageClass cmdlet gets move damage classes from PokeAPI + +Damage classes moves can have, e.g. +physical, special, or non-damaging + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeMoveDamageClass +``` + +Gets the first 20 move damage classes sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeMoveDamageClass -id 1 +``` + +Gets the move damage class with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeMoveDamageClass -name ditto +``` + +Gets the move damage class with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeMoveDamageClass -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveDamageClass.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveDamageClass.html) + diff --git a/docs/site/move/Get-PokeMoveLearnMethod.md b/docs/site/move/Get-PokeMoveLearnMethod.md new file mode 100644 index 0000000..87094ff --- /dev/null +++ b/docs/site/move/Get-PokeMoveLearnMethod.md @@ -0,0 +1,169 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: move +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveLearnMethod.html +parent: GET +schema: 2.0.0 +title: Get-PokeMoveLearnMethod +--- + +# Get-PokeMoveLearnMethod + +## SYNOPSIS +Gets move learn methods from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeMoveLearnMethod [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeMoveLearnMethod -id [] +``` + +### index_ByName +```powershell +Get-PokeMoveLearnMethod -name [] +``` + +## DESCRIPTION +The Get-PokeMoveLearnMethod cmdlet gets move learn methods from PokeAPI + +Methods by which Pokemon can learn moves + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeMoveLearnMethod +``` + +Gets the first 20 move learn methods sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeMoveLearnMethod -id 1 +``` + +Gets the move learn method with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeMoveLearnMethod -name ditto +``` + +Gets the move learn method with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeMoveLearnMethod -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveLearnMethod.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveLearnMethod.html) + diff --git a/docs/site/move/Get-PokeMoveTarget.md b/docs/site/move/Get-PokeMoveTarget.md new file mode 100644 index 0000000..ca9117b --- /dev/null +++ b/docs/site/move/Get-PokeMoveTarget.md @@ -0,0 +1,171 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: move +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveTarget.html +parent: GET +schema: 2.0.0 +title: Get-PokeMoveTarget +--- + +# Get-PokeMoveTarget + +## SYNOPSIS +Gets move targets from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeMoveTarget [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeMoveTarget -id [] +``` + +### index_ByName +```powershell +Get-PokeMoveTarget -name [] +``` + +## DESCRIPTION +The Get-PokeMoveTarget cmdlet gets move targets from PokeAPI + +Targets moves can be directed at during battle + +Targets can be Pokemon, environments or even other moves. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeMoveTarget +``` + +Gets the first 20 move targets sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeMoveTarget -id 1 +``` + +Gets the move target with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeMoveTarget -name ditto +``` + +Gets the move target with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeMoveTarget -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveTarget.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/move/Get-PokeMoveTarget.html) + diff --git a/docs/site/move/POST.md b/docs/site/move/POST.md new file mode 100644 index 0000000..74765fb --- /dev/null +++ b/docs/site/move/POST.md @@ -0,0 +1,5 @@ +--- +title: POST +parent: move +has_children: true +--- diff --git a/docs/site/move/PUT.md b/docs/site/move/PUT.md new file mode 100644 index 0000000..1f78a95 --- /dev/null +++ b/docs/site/move/PUT.md @@ -0,0 +1,5 @@ +--- +title: PUT +parent: move +has_children: true +--- diff --git a/docs/site/move/index.md b/docs/site/move/index.md new file mode 100644 index 0000000..ae302e5 --- /dev/null +++ b/docs/site/move/index.md @@ -0,0 +1,18 @@ +--- +title: move +has_children: true +--- + +## move - endpoint help & documentation + +{: .highlight } +Some functions will handle more than one endpoint and the numbers below show the total endpoints **not** the total functions + +| **Method** | **Endpoint Count** | +|------------|---------------------| +| DELETE | 0 | +| GET | 14 | +| POST | 0 | +| PUT | 0 | + +Have a look around and if you would like to contribute please read over the [Contributing guide](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) diff --git a/docs/site/pokemon/DELETE.md b/docs/site/pokemon/DELETE.md new file mode 100644 index 0000000..a8050f8 --- /dev/null +++ b/docs/site/pokemon/DELETE.md @@ -0,0 +1,5 @@ +--- +title: DELETE +parent: pokemon +has_children: true +--- diff --git a/docs/site/pokemon/GET.md b/docs/site/pokemon/GET.md new file mode 100644 index 0000000..4457c15 --- /dev/null +++ b/docs/site/pokemon/GET.md @@ -0,0 +1,5 @@ +--- +title: GET +parent: pokemon +has_children: true +--- diff --git a/docs/site/pokemon/Get-PokePokemon.md b/docs/site/pokemon/Get-PokePokemon.md new file mode 100644 index 0000000..6ed0818 --- /dev/null +++ b/docs/site/pokemon/Get-PokePokemon.md @@ -0,0 +1,173 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: pokemon +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemon.html +parent: GET +schema: 2.0.0 +title: Get-PokePokemon +--- + +# Get-PokePokemon + +## SYNOPSIS +Gets Pokemon from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokePokemon [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokePokemon -id [] +``` + +### index_ByName +```powershell +Get-PokePokemon -name [] +``` + +## DESCRIPTION +The Get-PokePokemon cmdlet gets Pokemon from PokeAPI + +Pokemon are the creatures that inhabit the world of the Pokemon games. +They can be caught using Pokeballs and trained by battling with other Pokemon. +Each Pokemon belongs to a specific species but may take on a variant which makes +it differ from other Pokemon of the same species, such as base stats, +available abilities and typings. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokePokemon +``` + +Gets the first 20 pokemon sorted by id + +### EXAMPLE 2 +```powershell +Get-PokePokemon -id 1 +``` + +Gets the pokemon with the defined id + +### EXAMPLE 3 +```powershell +Get-PokePokemon -name ditto +``` + +Gets the pokemon with the defined name + +### EXAMPLE 4 +```powershell +Get-PokePokemon -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemon.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemon.html) + diff --git a/docs/site/pokemon/Get-PokePokemonAbility.md b/docs/site/pokemon/Get-PokePokemonAbility.md new file mode 100644 index 0000000..ed1e2c1 --- /dev/null +++ b/docs/site/pokemon/Get-PokePokemonAbility.md @@ -0,0 +1,170 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: pokemon +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonAbility.html +parent: GET +schema: 2.0.0 +title: Get-PokePokemonAbility +--- + +# Get-PokePokemonAbility + +## SYNOPSIS +Gets Pokemon abilities from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokePokemonAbility [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokePokemonAbility -id [] +``` + +### index_ByName +```powershell +Get-PokePokemonAbility -name [] +``` + +## DESCRIPTION +The Get-PokePokemonAbility cmdlet gets Pokemon abilities from PokeAPI + +Abilities provide passive effects for Pokemon in battle or in the overworld. +Pokemon have multiple possible abilities but can have only one ability at a time + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokePokemonAbility +``` + +Gets the first 20 Pokemon abilities sorted by id + +### EXAMPLE 2 +```powershell +Get-PokePokemonAbility -id 1 +``` + +Gets the Pokemon ability with the defined id + +### EXAMPLE 3 +```powershell +Get-PokePokemonAbility -name ditto +``` + +Gets the Pokemon ability with the defined name + +### EXAMPLE 4 +```powershell +Get-PokePokemonAbility -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonAbility.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonAbility.html) + diff --git a/docs/site/pokemon/Get-PokePokemonCharacteristic.md b/docs/site/pokemon/Get-PokePokemonCharacteristic.md new file mode 100644 index 0000000..e50fb6e --- /dev/null +++ b/docs/site/pokemon/Get-PokePokemonCharacteristic.md @@ -0,0 +1,172 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: pokemon +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonCharacteristic.html +parent: GET +schema: 2.0.0 +title: Get-PokePokemonCharacteristic +--- + +# Get-PokePokemonCharacteristic + +## SYNOPSIS +Gets Pokemon characteristics from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokePokemonCharacteristic [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokePokemonCharacteristic -id [] +``` + +### index_ByName +```powershell +Get-PokePokemonCharacteristic -name [] +``` + +## DESCRIPTION +The Get-PokePokemonCharacteristic cmdlet gets +Pokemon characteristics from PokeAPI + +Characteristics indicate which stat contains a Pokemon's highest IV. +A Pokemon's Characteristic is determined by the remainder +of its highest IV divided by 5 (gene_modulo). + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokePokemonCharacteristic +``` + +Gets the first 20 Pokemon characteristics sorted by id + +### EXAMPLE 2 +```powershell +Get-PokePokemonCharacteristic -id 1 +``` + +Gets the Pokemon characteristic with the defined id + +### EXAMPLE 3 +```powershell +Get-PokePokemonCharacteristic -name ditto +``` + +Gets the Pokemon characteristic with the defined name + +### EXAMPLE 4 +```powershell +Get-PokePokemonCharacteristic -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonCharacteristic.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonCharacteristic.html) + diff --git a/docs/site/pokemon/Get-PokePokemonColor.md b/docs/site/pokemon/Get-PokePokemonColor.md new file mode 100644 index 0000000..e146766 --- /dev/null +++ b/docs/site/pokemon/Get-PokePokemonColor.md @@ -0,0 +1,172 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: pokemon +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonColor.html +parent: GET +schema: 2.0.0 +title: Get-PokePokemonColor +--- + +# Get-PokePokemonColor + +## SYNOPSIS +Gets pokemon colors from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokePokemonColor [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokePokemonColor -id [] +``` + +### index_ByName +```powershell +Get-PokePokemonColor -name [] +``` + +## DESCRIPTION +The Get-PokePokemonColor cmdlet gets pokemon colors from PokeAPI + +Colors used for sorting Pokemon in a Pokedex. +The color listed in the Pokedex +is usually the color most apparent or covering each Pokemon's body. +No orange category exists; Pokemon that are primarily orange are listed as red or brown. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokePokemonColor +``` + +Gets the first 20 pokemon colors sorted by id + +### EXAMPLE 2 +```powershell +Get-PokePokemonColor -id 1 +``` + +Gets the pokemon color with the defined id + +### EXAMPLE 3 +```powershell +Get-PokePokemonColor -name ditto +``` + +Gets the pokemon color with the defined name + +### EXAMPLE 4 +```powershell +Get-PokePokemonColor -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonColor.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonColor.html) + diff --git a/docs/site/pokemon/Get-PokePokemonEggGroup.md b/docs/site/pokemon/Get-PokePokemonEggGroup.md new file mode 100644 index 0000000..e11ae52 --- /dev/null +++ b/docs/site/pokemon/Get-PokePokemonEggGroup.md @@ -0,0 +1,171 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: pokemon +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonEggGroup.html +parent: GET +schema: 2.0.0 +title: Get-PokePokemonEggGroup +--- + +# Get-PokePokemonEggGroup + +## SYNOPSIS +Gets egg groups from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokePokemonEggGroup [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokePokemonEggGroup -id [] +``` + +### index_ByName +```powershell +Get-PokePokemonEggGroup -name [] +``` + +## DESCRIPTION +The Get-PokePokemonEggGroup cmdlet gets egg groups from PokeAPI + +Egg Groups are categories which determine which Pokemon are +able to interbreed. +Pokemon may belong to either one or two Egg Groups + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokePokemonEggGroup +``` + +Gets the first 20 egg groups sorted by id + +### EXAMPLE 2 +```powershell +Get-PokePokemonEggGroup -id 1 +``` + +Gets the egg group with the defined id + +### EXAMPLE 3 +```powershell +Get-PokePokemonEggGroup -name ditto +``` + +Gets the egg group with the defined name + +### EXAMPLE 4 +```powershell +Get-PokePokemonEggGroup -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonEggGroup.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonEggGroup.html) + diff --git a/docs/site/pokemon/Get-PokePokemonEncounter.md b/docs/site/pokemon/Get-PokePokemonEncounter.md new file mode 100644 index 0000000..b82e145 --- /dev/null +++ b/docs/site/pokemon/Get-PokePokemonEncounter.md @@ -0,0 +1,94 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: pokemon +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonEncounter.html +parent: GET +schema: 2.0.0 +title: Get-PokePokemonEncounter +--- + +# Get-PokePokemonEncounter + +## SYNOPSIS +Gets pokemon location areas from PokeAPI + +## SYNTAX + +### index_ById (Default) +```powershell +Get-PokePokemonEncounter -id [] +``` + +### index_ByName +```powershell +Get-PokePokemonEncounter -name [] +``` + +## DESCRIPTION +The Get-PokePokemonEncounter cmdlet gets pokemon location areas from PokeAPI + +Pokemon Location Areas are ares where Pokemon can be found + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokePokemonEncounter -id 1 +``` + +Gets the pokemon location area with the defined id + +### EXAMPLE 2 +```powershell +Get-PokePokemonEncounter -name ditto +``` + +Gets the pokemon location area with the defined name + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonEncounter.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonEncounter.html) + diff --git a/docs/site/pokemon/Get-PokePokemonGender.md b/docs/site/pokemon/Get-PokePokemonGender.md new file mode 100644 index 0000000..e1c504f --- /dev/null +++ b/docs/site/pokemon/Get-PokePokemonGender.md @@ -0,0 +1,171 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: pokemon +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonGender.html +parent: GET +schema: 2.0.0 +title: Get-PokePokemonGender +--- + +# Get-PokePokemonGender + +## SYNOPSIS +Gets genders from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokePokemonGender [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokePokemonGender -id [] +``` + +### index_ByName +```powershell +Get-PokePokemonGender -name [] +``` + +## DESCRIPTION +The Get-PokePokemonGender cmdlet gets genders from PokeAPI + +Genders were introduced in Generation II for the purposes of +breeding Pokemon but can also result in visual differences or +even different evolutionary lines + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokePokemonGender +``` + +Gets the first 20 genders sorted by id + +### EXAMPLE 2 +```powershell +Get-PokePokemonGender -id 1 +``` + +Gets the gender with the defined id + +### EXAMPLE 3 +```powershell +Get-PokePokemonGender -name ditto +``` + +Gets the gender with the defined name + +### EXAMPLE 4 +```powershell +Get-PokePokemonGender -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonGender.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonGender.html) + diff --git a/docs/site/pokemon/Get-PokePokemonGrowthRate.md b/docs/site/pokemon/Get-PokePokemonGrowthRate.md new file mode 100644 index 0000000..3035140 --- /dev/null +++ b/docs/site/pokemon/Get-PokePokemonGrowthRate.md @@ -0,0 +1,169 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: pokemon +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonGrowthRate.html +parent: GET +schema: 2.0.0 +title: Get-PokePokemonGrowthRate +--- + +# Get-PokePokemonGrowthRate + +## SYNOPSIS +Gets growth rates from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokePokemonGrowthRate [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokePokemonGrowthRate -id [] +``` + +### index_ByName +```powershell +Get-PokePokemonGrowthRate -name [] +``` + +## DESCRIPTION +The Get-PokePokemonGrowthRate cmdlet gets growth rates from PokeAPI + +Growth rates are the speed with which Pokemon gain levels through experience + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokePokemonGrowthRate +``` + +Gets the first 20 growth rates sorted by id + +### EXAMPLE 2 +```powershell +Get-PokePokemonGrowthRate -id 1 +``` + +Gets the growth rate with the defined id + +### EXAMPLE 3 +```powershell +Get-PokePokemonGrowthRate -name ditto +``` + +Gets the growth rate with the defined name + +### EXAMPLE 4 +```powershell +Get-PokePokemonGrowthRate -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonGrowthRate.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonGrowthRate.html) + diff --git a/docs/site/pokemon/Get-PokePokemonHabitat.md b/docs/site/pokemon/Get-PokePokemonHabitat.md new file mode 100644 index 0000000..e4cb164 --- /dev/null +++ b/docs/site/pokemon/Get-PokePokemonHabitat.md @@ -0,0 +1,170 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: pokemon +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonHabitat.html +parent: GET +schema: 2.0.0 +title: Get-PokePokemonHabitat +--- + +# Get-PokePokemonHabitat + +## SYNOPSIS +Gets pokemon habitats from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokePokemonHabitat [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokePokemonHabitat -id [] +``` + +### index_ByName +```powershell +Get-PokePokemonHabitat -name [] +``` + +## DESCRIPTION +The Get-PokePokemonHabitat cmdlet gets pokemon habitats from PokeAPI + +Habitats are generally different terrain Pokemon can be found +in but can also be areas designated for rare or legendary Pokemon. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokePokemonHabitat +``` + +Gets the first 20 pokemon habitats sorted by id + +### EXAMPLE 2 +```powershell +Get-PokePokemonHabitat -id 1 +``` + +Gets the pokemon habitat with the defined id + +### EXAMPLE 3 +```powershell +Get-PokePokemonHabitat -name ditto +``` + +Gets the pokemon habitat with the defined name + +### EXAMPLE 4 +```powershell +Get-PokePokemonHabitat -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonHabitat.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonHabitat.html) + diff --git a/docs/site/pokemon/Get-PokePokemonNature.md b/docs/site/pokemon/Get-PokePokemonNature.md new file mode 100644 index 0000000..fd79356 --- /dev/null +++ b/docs/site/pokemon/Get-PokePokemonNature.md @@ -0,0 +1,169 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: pokemon +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonNature.html +parent: GET +schema: 2.0.0 +title: Get-PokePokemonNature +--- + +# Get-PokePokemonNature + +## SYNOPSIS +Gets natures from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokePokemonNature [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokePokemonNature -id [] +``` + +### index_ByName +```powershell +Get-PokePokemonNature -name [] +``` + +## DESCRIPTION +The Get-PokePokemonNature cmdlet gets natures from PokeAPI + +Natures influence how a Pokemon's stats grow + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokePokemonNature +``` + +Gets the first 20 natures sorted by id + +### EXAMPLE 2 +```powershell +Get-PokePokemonNature -id 1 +``` + +Gets the nature with the defined id + +### EXAMPLE 3 +```powershell +Get-PokePokemonNature -name ditto +``` + +Gets the nature with the defined name + +### EXAMPLE 4 +```powershell +Get-PokePokemonNature -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonNature.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonNature.html) + diff --git a/docs/site/pokemon/Get-PokePokemonPokeathlonStat.md b/docs/site/pokemon/Get-PokePokemonPokeathlonStat.md new file mode 100644 index 0000000..6515f04 --- /dev/null +++ b/docs/site/pokemon/Get-PokePokemonPokeathlonStat.md @@ -0,0 +1,171 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: pokemon +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonPokeathlonStat.html +parent: GET +schema: 2.0.0 +title: Get-PokePokemonPokeathlonStat +--- + +# Get-PokePokemonPokeathlonStat + +## SYNOPSIS +Gets pokeathlon stats from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokePokemonPokeathlonStat [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokePokemonPokeathlonStat -id [] +``` + +### index_ByName +```powershell +Get-PokePokemonPokeathlonStat -name [] +``` + +## DESCRIPTION +The Get-PokePokemonPokeathlonStat cmdlet gets pokeathlon stats from PokeAPI + +Pokeathlon Stats are different attributes of a Pokemon's performance in Pokeathlons. +In Pokeathlons, competitions happen on different courses; one for each +of the different Pokeathlon stats + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokePokemonPokeathlonStat +``` + +Gets the first 20 pokeathlon stats sorted by id + +### EXAMPLE 2 +```powershell +Get-PokePokemonPokeathlonStat -id 1 +``` + +Gets the pokeathlon stat with the defined id + +### EXAMPLE 3 +```powershell +Get-PokePokemonPokeathlonStat -name ditto +``` + +Gets the pokeathlon stat with the defined name + +### EXAMPLE 4 +```powershell +Get-PokePokemonPokeathlonStat -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonPokeathlonStat.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonPokeathlonStat.html) + diff --git a/docs/site/pokemon/Get-PokePokemonShape.md b/docs/site/pokemon/Get-PokePokemonShape.md new file mode 100644 index 0000000..6696be0 --- /dev/null +++ b/docs/site/pokemon/Get-PokePokemonShape.md @@ -0,0 +1,169 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: pokemon +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonShape.html +parent: GET +schema: 2.0.0 +title: Get-PokePokemonShape +--- + +# Get-PokePokemonShape + +## SYNOPSIS +Gets pokemon shapes from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokePokemonShape [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokePokemonShape -id [] +``` + +### index_ByName +```powershell +Get-PokePokemonShape -name [] +``` + +## DESCRIPTION +The Get-PokePokemonShape cmdlet gets pokemon shapes from PokeAPI + +Shapes used for sorting Pokemon in a Pokedex + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokePokemonShape +``` + +Gets the first 20 pokemon shapes sorted by id + +### EXAMPLE 2 +```powershell +Get-PokePokemonShape -id 1 +``` + +Gets the pokemon shape with the defined id + +### EXAMPLE 3 +```powershell +Get-PokePokemonShape -name ditto +``` + +Gets the pokemon shape with the defined name + +### EXAMPLE 4 +```powershell +Get-PokePokemonShape -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonShape.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonShape.html) + diff --git a/docs/site/pokemon/Get-PokePokemonSpecies.md b/docs/site/pokemon/Get-PokePokemonSpecies.md new file mode 100644 index 0000000..f4573a3 --- /dev/null +++ b/docs/site/pokemon/Get-PokePokemonSpecies.md @@ -0,0 +1,174 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: pokemon +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonSpecies.html +parent: GET +schema: 2.0.0 +title: Get-PokePokemonSpecies +--- + +# Get-PokePokemonSpecies + +## SYNOPSIS +Gets pokemon species from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokePokemonSpecies [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokePokemonSpecies -id [] +``` + +### index_ByName +```powershell +Get-PokePokemonSpecies -name [] +``` + +## DESCRIPTION +The Get-PokePokemonSpecies cmdlet gets pokemon species from PokeAPI + +A Pokemon Species forms the basis for at least one Pokemon. +Attributes of a +Pokemon species are shared across all varieties of Pokemon within the species. + +A good example is Wormadam; Wormadam is the species which can be found in three +different varieties, Wormadam-Trash, Wormadam-Sandy and Wormadam-Plant. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokePokemonSpecies +``` + +Gets the first 20 pokemon species sorted by id + +### EXAMPLE 2 +```powershell +Get-PokePokemonSpecies -id 1 +``` + +Gets the pokemon species with the defined id + +### EXAMPLE 3 +```powershell +Get-PokePokemonSpecies -name ditto +``` + +Gets the pokemon species with the defined name + +### EXAMPLE 4 +```powershell +Get-PokePokemonSpecies -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonSpecies.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonSpecies.html) + diff --git a/docs/site/pokemon/Get-PokePokemonStat.md b/docs/site/pokemon/Get-PokePokemonStat.md new file mode 100644 index 0000000..139f4e0 --- /dev/null +++ b/docs/site/pokemon/Get-PokePokemonStat.md @@ -0,0 +1,172 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: pokemon +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonStat.html +parent: GET +schema: 2.0.0 +title: Get-PokePokemonStat +--- + +# Get-PokePokemonStat + +## SYNOPSIS +Gets pokemon stats from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokePokemonStat [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokePokemonStat -id [] +``` + +### index_ByName +```powershell +Get-PokePokemonStat -name [] +``` + +## DESCRIPTION +The Get-PokePokemonStat cmdlet gets pokemon stats from PokeAPI + +Stats determine certain aspects of battles. +Each Pokemon has a +value for each stat which grows as they gain levels and can be +altered momentarily by effects in battles. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokePokemonStat +``` + +Gets the first 20 pokemon stats sorted by id + +### EXAMPLE 2 +```powershell +Get-PokePokemonStat -id 1 +``` + +Gets the pokemon stat with the defined id + +### EXAMPLE 3 +```powershell +Get-PokePokemonStat -name ditto +``` + +Gets the pokemon stat with the defined name + +### EXAMPLE 4 +```powershell +Get-PokePokemonStat -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonStat.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonStat.html) + diff --git a/docs/site/pokemon/Get-PokePokemonType.md b/docs/site/pokemon/Get-PokePokemonType.md new file mode 100644 index 0000000..7d20dc1 --- /dev/null +++ b/docs/site/pokemon/Get-PokePokemonType.md @@ -0,0 +1,173 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: pokemon +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonType.html +parent: GET +schema: 2.0.0 +title: Get-PokePokemonType +--- + +# Get-PokePokemonType + +## SYNOPSIS +Gets pokemon move type properties from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokePokemonType [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokePokemonType -id [] +``` + +### index_ByName +```powershell +Get-PokePokemonType -name [] +``` + +## DESCRIPTION +The Get-PokePokemonType cmdlet gets pokemon move type properties from PokeAPI + +Types are properties for Pokemon and their moves. +Each type has +three properties: which types of Pokemon it is super effective against, +which types of Pokemon it is not very effective against, and which +types of Pokemon it is completely ineffective against. + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokePokemonType +``` + +Gets the first 20 pokemon move type properties sorted by id + +### EXAMPLE 2 +```powershell +Get-PokePokemonType -id 1 +``` + +Gets the pokemon move type property with the defined id + +### EXAMPLE 3 +```powershell +Get-PokePokemonType -name ditto +``` + +Gets the pokemon move type property with the defined name + +### EXAMPLE 4 +```powershell +Get-PokePokemonType -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonType.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/pokemon/Get-PokePokemonType.html) + diff --git a/docs/site/pokemon/POST.md b/docs/site/pokemon/POST.md new file mode 100644 index 0000000..9a101ea --- /dev/null +++ b/docs/site/pokemon/POST.md @@ -0,0 +1,5 @@ +--- +title: POST +parent: pokemon +has_children: true +--- diff --git a/docs/site/pokemon/PUT.md b/docs/site/pokemon/PUT.md new file mode 100644 index 0000000..021b5e2 --- /dev/null +++ b/docs/site/pokemon/PUT.md @@ -0,0 +1,5 @@ +--- +title: PUT +parent: pokemon +has_children: true +--- diff --git a/docs/site/pokemon/index.md b/docs/site/pokemon/index.md new file mode 100644 index 0000000..4c7abfb --- /dev/null +++ b/docs/site/pokemon/index.md @@ -0,0 +1,18 @@ +--- +title: pokemon +has_children: true +--- + +## pokemon - endpoint help & documentation + +{: .highlight } +Some functions will handle more than one endpoint and the numbers below show the total endpoints **not** the total functions + +| **Method** | **Endpoint Count** | +|------------|---------------------| +| DELETE | 0 | +| GET | 31 | +| POST | 0 | +| PUT | 0 | + +Have a look around and if you would like to contribute please read over the [Contributing guide](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) diff --git a/docs/site/utility/DELETE.md b/docs/site/utility/DELETE.md new file mode 100644 index 0000000..9d24ee4 --- /dev/null +++ b/docs/site/utility/DELETE.md @@ -0,0 +1,5 @@ +--- +title: DELETE +parent: utility +has_children: true +--- diff --git a/docs/site/utility/GET.md b/docs/site/utility/GET.md new file mode 100644 index 0000000..5abcac9 --- /dev/null +++ b/docs/site/utility/GET.md @@ -0,0 +1,5 @@ +--- +title: GET +parent: utility +has_children: true +--- diff --git a/docs/site/utility/Get-PokeEndpoint.md b/docs/site/utility/Get-PokeEndpoint.md new file mode 100644 index 0000000..5fa3b42 --- /dev/null +++ b/docs/site/utility/Get-PokeEndpoint.md @@ -0,0 +1,49 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: utility +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/utility/Get-PokeEndpoint.html +parent: GET +schema: 2.0.0 +title: Get-PokeEndpoint +--- + +# Get-PokeEndpoint + +## SYNOPSIS +Gets endpoints from PokeAPI + +## SYNTAX + +```powershell +Get-PokeEndpoint [] +``` + +## DESCRIPTION +The Get-PokeEndpoint cmdlet gets endpoints from PokeAPI + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeEndpoint +``` + +Gets the endpoints from PokeAPI + +## PARAMETERS + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/utility/Get-PokeEndpoint.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/utility/Get-PokeEndpoint.html) + diff --git a/docs/site/utility/Get-PokeLanguage.md b/docs/site/utility/Get-PokeLanguage.md new file mode 100644 index 0000000..c797eac --- /dev/null +++ b/docs/site/utility/Get-PokeLanguage.md @@ -0,0 +1,169 @@ +--- +external help file: PokeAPI-help.xml +grand_parent: utility +Module Name: PokeAPI +online version: https://celerium.github.io/PokeAPI-PowerShellWrapper/site/utility/Get-PokeLanguage.html +parent: GET +schema: 2.0.0 +title: Get-PokeLanguage +--- + +# Get-PokeLanguage + +## SYNOPSIS +Gets languages from PokeAPI + +## SYNTAX + +### index_ByAll (Default) +```powershell +Get-PokeLanguage [-offset ] [-limit ] [-allPages] [] +``` + +### index_ById +```powershell +Get-PokeLanguage -id [] +``` + +### index_ByName +```powershell +Get-PokeLanguage -name [] +``` + +## DESCRIPTION +The Get-PokeLanguage cmdlet gets languages from PokeAPI + +Languages for translations of API resource information + +## EXAMPLES + +### EXAMPLE 1 +```powershell +Get-PokeLanguage +``` + +Gets the first 20 languages sorted by id + +### EXAMPLE 2 +```powershell +Get-PokeLanguage -id 1 +``` + +Gets the language with the defined id + +### EXAMPLE 3 +```powershell +Get-PokeLanguage -name ditto +``` + +Gets the language with the defined name + +### EXAMPLE 4 +```powershell +Get-PokeLanguage -offset 151 -limit 100 +``` + +Gets the first 100 resources starting at resources with +an id over 151 + +## PARAMETERS + +### -id +Defines id of the resource + +```yaml +Type: Int32 +Parameter Sets: index_ById +Aliases: + +Required: True +Position: Named +Default value: 0 +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -name +Defines name of the resource + +```yaml +Type: String +Parameter Sets: index_ByName +Aliases: + +Required: True +Position: Named +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### -offset +Defines the page number to return + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -limit +Defines the amount of resources to return with each page + +By default only 20 resources are returned + +```yaml +Type: Int32 +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: 0 +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -allPages +Returns all resources from an endpoint + +As of 2024-02, there is no cap on how many resources can be +returned using the limit parameter. +There is currently no real +use for this parameter and it was included simply to account if +pagination is introduced. + +```yaml +Type: SwitchParameter +Parameter Sets: index_ByAll +Aliases: + +Required: False +Position: Named +Default value: False +Accept pipeline input: False +Accept wildcard characters: False +``` + +### CommonParameters +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES +n/a + +## RELATED LINKS + +[https://celerium.github.io/PokeAPI-PowerShellWrapper/site/utility/Get-PokeLanguage.html](https://celerium.github.io/PokeAPI-PowerShellWrapper/site/utility/Get-PokeLanguage.html) + diff --git a/docs/site/utility/POST.md b/docs/site/utility/POST.md new file mode 100644 index 0000000..82ad694 --- /dev/null +++ b/docs/site/utility/POST.md @@ -0,0 +1,5 @@ +--- +title: POST +parent: utility +has_children: true +--- diff --git a/docs/site/utility/PUT.md b/docs/site/utility/PUT.md new file mode 100644 index 0000000..355634f --- /dev/null +++ b/docs/site/utility/PUT.md @@ -0,0 +1,5 @@ +--- +title: PUT +parent: utility +has_children: true +--- diff --git a/docs/site/utility/index.md b/docs/site/utility/index.md new file mode 100644 index 0000000..b172f3f --- /dev/null +++ b/docs/site/utility/index.md @@ -0,0 +1,18 @@ +--- +title: utility +has_children: true +--- + +## utility - endpoint help & documentation + +{: .highlight } +Some functions will handle more than one endpoint and the numbers below show the total endpoints **not** the total functions + +| **Method** | **Endpoint Count** | +|------------|---------------------| +| DELETE | 0 | +| GET | 3 | +| POST | 0 | +| PUT | 0 | + +Have a look around and if you would like to contribute please read over the [Contributing guide](https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/.github/CONTRIBUTING.md) diff --git a/examples/Get-PokeAgentReport/Assets/JavaScriptEnd.html b/examples/Get-PokeAgentReport/Assets/JavaScriptEnd.html new file mode 100644 index 0000000..303bcc7 --- /dev/null +++ b/examples/Get-PokeAgentReport/Assets/JavaScriptEnd.html @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/examples/Get-PokeAgentReport/Assets/JavaScriptHeader.html b/examples/Get-PokeAgentReport/Assets/JavaScriptHeader.html new file mode 100644 index 0000000..130810f --- /dev/null +++ b/examples/Get-PokeAgentReport/Assets/JavaScriptHeader.html @@ -0,0 +1,19 @@ + diff --git a/examples/Get-PokeAgentReport/Assets/Meta.html b/examples/Get-PokeAgentReport/Assets/Meta.html new file mode 100644 index 0000000..28966cc --- /dev/null +++ b/examples/Get-PokeAgentReport/Assets/Meta.html @@ -0,0 +1,45 @@ + + + + + + + + + + + xTITLECHANGEx + + + + + + + + + + + \ No newline at end of file diff --git a/examples/Get-PokeAgentReport/Assets/PreLoader.html b/examples/Get-PokeAgentReport/Assets/PreLoader.html new file mode 100644 index 0000000..7e18876 --- /dev/null +++ b/examples/Get-PokeAgentReport/Assets/PreLoader.html @@ -0,0 +1,5 @@ +
+
+
+
+
\ No newline at end of file diff --git a/examples/Get-PokeAgentReport/Assets/SideBar.html b/examples/Get-PokeAgentReport/Assets/SideBar.html new file mode 100644 index 0000000..98e0c62 --- /dev/null +++ b/examples/Get-PokeAgentReport/Assets/SideBar.html @@ -0,0 +1,38 @@ +
+ +
\ No newline at end of file diff --git a/examples/Get-PokeAgentReport/Assets/Summary.html b/examples/Get-PokeAgentReport/Assets/Summary.html new file mode 100644 index 0000000..95f8700 --- /dev/null +++ b/examples/Get-PokeAgentReport/Assets/Summary.html @@ -0,0 +1,143 @@ +
+ + + + +
+
+
+
+
+
+ Total Agents
+
xCARD1Valuex
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+
+ Agent Versions +
+
xCARD2Valuex
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+
+ Protected Volumes
+
xCARD3Valuex
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+
+ Unprotected Volumes
+
xCARD4Valuex
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+
+ Paused Agents
+
xCARD5Valuex
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+
+ Archived Agents
+
xCARD6Valuex
+
+
+ +
+
+
+
+
+ +
\ No newline at end of file diff --git a/examples/Get-PokeAgentReport/Assets/TableContainer.html b/examples/Get-PokeAgentReport/Assets/TableContainer.html new file mode 100644 index 0000000..9076949 --- /dev/null +++ b/examples/Get-PokeAgentReport/Assets/TableContainer.html @@ -0,0 +1,7 @@ +
+

xHEADERx

+ +
+
\ No newline at end of file diff --git a/examples/Get-PokeAgentReport/Assets/TopBar.html b/examples/Get-PokeAgentReport/Assets/TopBar.html new file mode 100644 index 0000000..4148d70 --- /dev/null +++ b/examples/Get-PokeAgentReport/Assets/TopBar.html @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/examples/Get-PokeAgentReport/Assets/styles.css b/examples/Get-PokeAgentReport/Assets/styles.css new file mode 100644 index 0000000..d309b5a --- /dev/null +++ b/examples/Get-PokeAgentReport/Assets/styles.css @@ -0,0 +1,2102 @@ +@charset "UTF-8"; +/*!*Start Bootstrap - SB Admin v7.0.3 (https://startbootstrap.com/template/sb-admin)*/ +:root { + --bs-blue: #0d6efd; + --bs-white: #fff; + --bs-gray: #6c757d; + --bs-gray-dark: #343a40; + --bs-gray-100: #f8f9fa; + --bs-gray-200: #e9ecef; + --bs-gray-300: #dee2e6; + --bs-gray-400: #ced4da; + --bs-gray-500: #adb5bd; + --bs-gray-600: #6c757d; + --bs-gray-700: #495057; + --bs-gray-800: #343a40; + --bs-gray-900: #212529; + --bs-primary: #0d6efd; + --bs-secondary: #6c757d; + --bs-success: #198754; + --bs-info: #0dcaf0; + --bs-warning: #ffc107; + --bs-danger: #dc3545; + --bs-light: #f8f9fa; + --bs-dark: #212529; + --bs-primary-rgb: 13, 110, 253; + --bs-secondary-rgb: 108, 117, 125; + --bs-success-rgb: 25, 135, 84; + --bs-info-rgb: 13, 202, 240; + --bs-warning-rgb: 255, 193, 7; + --bs-danger-rgb: 220, 53, 69; + --bs-light-rgb: 248, 249, 250; + --bs-dark-rgb: 33, 37, 41; + --bs-white-rgb: 255, 255, 255; + --bs-black-rgb: 0, 0, 0; + --bs-body-rgb: 33, 37, 41; + --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto,"Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif,"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas,"Liberation Mono", "Courier New", monospace; + --bs-gradient: linear-gradient(180deg,rgba(255, 255, 255, 0.15),rgba(255, 255, 255, 0)); + --bs-body-font-family: var(--bs-font-sans-serif); + --bs-body-font-size: 1rem; + --bs-body-font-weight: 400; + --bs-body-line-height: 1.5; + --bs-body-color: #212529; + --bs-body-bg: #fff; +} +*,::after,::before { + box-sizing: border-box; +} +@media (prefers-reduced-motion: no-preference) { + :root { + scroll-behavior: smooth; + } +} +/* custom scrollbar (Chrome & Edge) */ +::-webkit-scrollbar { + width: 10px; + height: 10px; +} +::-webkit-scrollbar-thumb { + background: rgba(100, 100, 100); +} +::-webkit-scrollbar-track { + background: rgba(0, 0, 0, 0.050); +} +body { + margin: 0; + font-family: var(--bs-body-font-family); + font-size: var(--bs-body-font-size); + font-weight: var(--bs-body-font-weight); + line-height: var(--bs-body-line-height); + color: var(--bs-body-color); + text-align: var(--bs-body-text-align); + background-color: var(--bs-body-bg); + -webkit-text-size-adjust: 100%; + -webkit-tap-highlight-color: transparent; +} +.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6 { + margin-top: 0; + margin-bottom: 0.5rem; + font-weight: 500; + line-height: 1.2; +} +.h1,h1 { + font-size: calc(1.375rem + 1.5vw); +} +@media (min-width: 1200px) { + .h1,h1 { + font-size: 2.5rem; + } +} +.h2,h2 { + font-size: calc(1.325rem + 0.9vw); +} +@media (min-width: 1200px) { + .h2,h2 { + font-size: 2rem; + } +} +.h3,h3 { + font-size: calc(1.3rem + 0.6vw); +} +@media (min-width: 1200px) { + .h3,h3 { + font-size: 1.75rem; + } +} +.h4,h4 { + font-size: calc(1.275rem + 0.3vw); +} +@media (min-width: 1200px) { + .h4,h4 { + font-size: 1.5rem; + } +} +.h5,h5 { + font-size: 1.25rem; +} +.h6,h6 { + font-size: 1rem; +} +p { + margin-top: 0; + margin-bottom: 1rem; +} +ol,ul { + padding-left: 2rem; +} +dl,ol,ul { + margin-top: 0; + margin-bottom: 1rem; +} +.small,small { + font-size: 0.875em; +} +img,svg { + vertical-align: middle; +} +table { + caption-side: bottom; + border-collapse: collapse; +} +th { + text-align: inherit; + text-align: -webkit-match-parent; +} +tbody,td,tfoot,th,thead,tr { + border-color: inherit; + border-style: solid; + border-width: 0; +} +.GoodStatus { + --bs-bg-opacity: 1; + /*background-color: rgba(var(--bs-success-rgb), var(--bs-bg-opacity)) !important; + */ + background-color: #1cc88a !important; + --bs-text-opacity: 1; + color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important; +} +.InfoStatus { + --bs-bg-opacity: 1; + /*background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important; + */ + background-color: #36b9cc !important; + --bs-text-opacity: 1; + color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important; +} +.WarningStatus { + --bs-bg-opacity: 1; + /*background-color: rgba(var(--bs-warning-rgb), var(--bs-bg-opacity)) !important; + */ + background-color: #f6c23e !important; + --bs-text-opacity: 1; + color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important; +} +.BadStatus { + --bs-bg-opacity: 1; + /*background-color: rgba(var(--bs-danger-rgb), var(--bs-bg-opacity)) !important; + */ + background-color: #e74a3b !important; + --bs-text-opacity: 1; + color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important; +} +/*Row from SB-Admin2*/ +.row { + display: flex; + flex-wrap: wrap; + margin-right: -0.75rem; + margin-left: -0.75rem; +} +.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, .col,.col-auto, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm,.col-sm-auto, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-md,.col-md-auto, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg,.col-lg-auto, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl,.col-xl-auto { + position: relative; + width: 100%; + padding-right: 0.75rem; + padding-left: 0.75rem; +} +.col-auto { + flex: 0 0 auto; + width: auto; + max-width: 100%; +} +@media (min-width: 1200px) { + .col-xl { + flex-basis: 0; + flex-grow: 1; + max-width: 100%; + } + .row-cols-xl-1 > * { + flex: 0 0 100%; + max-width: 100%; + } + .row-cols-xl-2 > * { + flex: 0 0 50%; + max-width: 50%; + } + .row-cols-xl-3 > * { + flex: 0 0 33.33333%; + max-width: 33.33333%; + } + .row-cols-xl-4 > * { + flex: 0 0 25%; + max-width: 25%; + } + .row-cols-xl-5 > * { + flex: 0 0 20%; + max-width: 20%; + } + .row-cols-xl-6 > * { + flex: 0 0 16.66667%; + max-width: 16.66667%; + } + .col-xl-auto { + flex: 0 0 auto; + width: auto; + max-width: 100%; + } + .col-xl-1 { + flex: 0 0 8.33333%; + max-width: 8.33333%; + } + .col-xl-2 { + flex: 0 0 16.66667%; + max-width: 16.66667%; + } + .col-xl-20 { + flex: 0 0 20%; + max-width: 20%; + } + .col-xl-3 { + flex: 0 0 25%; + max-width: 25%; + } + .col-xl-4 { + flex: 0 0 33.33333%; + max-width: 33.33333%; + } + .col-xl-5 { + flex: 0 0 41.66667%; + max-width: 41.66667%; + } + .col-xl-6 { + flex: 0 0 50%; + max-width: 50%; + } + .col-xl-7 { + flex: 0 0 58.33333%; + max-width: 58.33333%; + } + .col-xl-8 { + flex: 0 0 66.66667%; + max-width: 66.66667%; + } + .col-xl-9 { + flex: 0 0 75%; + max-width: 75%; + } + .col-xl-10 { + flex: 0 0 83.33333%; + max-width: 83.33333%; + } + .col-xl-11 { + flex: 0 0 91.66667%; + max-width: 91.66667%; + } + .col-xl-12 { + flex: 0 0 100%; + max-width: 100%; + } + .order-xl-first { + order: -1; + } + .order-xl-last { + order: 13; + } + .order-xl-0 { + order: 0; + } + .order-xl-1 { + order: 1; + } + .order-xl-2 { + order: 2; + } + .order-xl-3 { + order: 3; + } + .order-xl-4 { + order: 4; + } + .order-xl-5 { + order: 5; + } + .order-xl-6 { + order: 6; + } + .order-xl-7 { + order: 7; + } + .order-xl-8 { + order: 8; + } + .order-xl-9 { + order: 9; + } + .order-xl-10 { + order: 10; + } + .order-xl-11 { + order: 11; + } + .order-xl-12 { + order: 12; + } + .offset-xl-0 { + margin-left: 0; + } + .offset-xl-1 { + margin-left: 8.33333%; + } + .offset-xl-2 { + margin-left: 16.66667%; + } + .offset-xl-3 { + margin-left: 25%; + } + .offset-xl-4 { + margin-left: 33.33333%; + } + .offset-xl-5 { + margin-left: 41.66667%; + } + .offset-xl-6 { + margin-left: 50%; + } + .offset-xl-7 { + margin-left: 58.33333%; + } + .offset-xl-8 { + margin-left: 66.66667%; + } + .offset-xl-9 { + margin-left: 75%; + } + .offset-xl-10 { + margin-left: 83.33333%; + } + .offset-xl-11 { + margin-left: 91.66667%; + } +} +@media (min-width: 768px) { + .col-md { + flex-basis: 0; + flex-grow: 1; + max-width: 100%; + } + .row-cols-md-1 > * { + flex: 0 0 100%; + max-width: 100%; + } + .row-cols-md-2 > * { + flex: 0 0 50%; + max-width: 50%; + } + .row-cols-md-3 > * { + flex: 0 0 33.33333%; + max-width: 33.33333%; + } + .row-cols-md-4 > * { + flex: 0 0 25%; + max-width: 25%; + } + .row-cols-md-5 > * { + flex: 0 0 20%; + max-width: 20%; + } + .row-cols-md-6 > * { + flex: 0 0 16.66667%; + max-width: 16.66667%; + } + .col-md-auto { + flex: 0 0 auto; + width: auto; + max-width: 100%; + } + .col-md-1 { + flex: 0 0 8.33333%; + max-width: 8.33333%; + } + .col-md-2 { + flex: 0 0 16.66667%; + max-width: 16.66667%; + } + .col-md-3 { + flex: 0 0 25%; + max-width: 25%; + } + .col-md-4 { + flex: 0 0 33.33333%; + max-width: 33.33333%; + } + .col-md-5 { + flex: 0 0 41.66667%; + max-width: 41.66667%; + } + .col-md-6 { + flex: 0 0 50%; + /*max-width: 50%; + */ + } + .col-md-7 { + flex: 0 0 58.33333%; + max-width: 58.33333%; + } + .col-md-8 { + flex: 0 0 66.66667%; + max-width: 66.66667%; + } + .col-md-9 { + flex: 0 0 75%; + max-width: 75%; + } + .col-md-10 { + flex: 0 0 83.33333%; + max-width: 83.33333%; + } + .col-md-11 { + flex: 0 0 91.66667%; + max-width: 91.66667%; + } + .col-md-12 { + flex: 0 0 100%; + max-width: 100%; + } + .order-md-first { + order: -1; + } + .order-md-last { + order: 13; + } + .order-md-0 { + order: 0; + } + .order-md-1 { + order: 1; + } + .order-md-2 { + order: 2; + } + .order-md-3 { + order: 3; + } + .order-md-4 { + order: 4; + } + .order-md-5 { + order: 5; + } + .order-md-6 { + order: 6; + } + .order-md-7 { + order: 7; + } + .order-md-8 { + order: 8; + } + .order-md-9 { + order: 9; + } + .order-md-10 { + order: 10; + } + .order-md-11 { + order: 11; + } + .order-md-12 { + order: 12; + } + .offset-md-0 { + margin-left: 0; + } + .offset-md-1 { + margin-left: 8.33333%; + } + .offset-md-2 { + margin-left: 16.66667%; + } + .offset-md-3 { + margin-left: 25%; + } + .offset-md-4 { + margin-left: 33.33333%; + } + .offset-md-5 { + margin-left: 41.66667%; + } + .offset-md-6 { + margin-left: 50%; + } + .offset-md-7 { + margin-left: 58.33333%; + } + .offset-md-8 { + margin-left: 66.66667%; + } + .offset-md-9 { + margin-left: 75%; + } + .offset-md-10 { + margin-left: 83.33333%; + } + .offset-md-11 { + margin-left: 91.66667%; + } +} +.mb-4,.my-4 { + margin-bottom: 1.5rem !important; +} +.border-left-primary { + border-left: 0.25rem solid #4e73df !important; +} +.border-left-secondary { + border-left: 0.25rem solid #858796 !important; +} +.border-left-success { + border-left: 0.25rem solid #1cc88a !important; +} +.border-left-info { + border-left: 0.25rem solid #36b9cc !important; +} +.border-left-warning { + border-left: 0.25rem solid #f6c23e !important; +} +.border-left-danger { + border-left: 0.25rem solid #e74a3b !important; +} +.border-bottom-light { + border-bottom: 0.25rem solid #f8f9fc !important; +} +.border-left-dark { + border-left: 0.25rem solid #5a5c69 !important; +} +.shadow-sm { + box-shadow: 0 0.125rem 0.25rem 0 rgba(58, 59, 69, 0.2) !important; +} +.shadow { + box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important; +} +.shadow-lg { + box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; +} +.shadow-none { + box-shadow: none !important; +} +progress { + vertical-align: baseline; +} +.progress-sm { + height: .5rem; +} +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 1rem 0; + } + to { + background-position: 0 0; + } +} +@keyframes progress-bar-stripes { + from { + background-position: 1rem 0; + } + to { + background-position: 0 0; + } +} +.progress { + display: flex; + height: 1rem; + overflow: hidden; + line-height: 0; + font-size: 0.75rem; + background-color: #eaecf4; + border-radius: 0.35rem; + height: 7px; +} +.progress-bar { + display: flex; + flex-direction: column; + justify-content: center; + overflow: hidden; + color: #fff; + text-align: center; + white-space: nowrap; + background-color: #4e73df; + transition: width 0.6s ease; +} +@media (prefers-reduced-motion: reduce) { + .progress-bar { + transition: none; + } +} +.progress-bar-striped { + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: 1rem 1rem; +} +.progress-bar-animated { + -webkit-animation: 1s linear infinite progress-bar-stripes; + animation: 1s linear infinite progress-bar-stripes; +} +@media (prefers-reduced-motion: reduce) { + .progress-bar-animated { + -webkit-animation: none; + animation: none; + } +} +.bg-info { + background-color: #36b9cc !important; +} +a.bg-info:hover, a.bg-info:focus,button.bg-info:hover,button.bg-info:focus { + background-color: #2a96a5 !important; +} +.h-100 { + height: 100% !important; +} +.pt-2,.py-2 { + padding-top: 0.5rem !important; +} +.pb-2,.py-2 { + padding-bottom: 0.5rem !important; +} +.mb-1,.my-1 { + margin-bottom: 0.25rem !important; +} +.mr-2,.mx-2 { + margin-right: 0.5rem !important; +} +.mb-0,.my-0 { + margin-bottom: 0 !important; +} +.mr-3,.mx-3 { + margin-right: 1rem !important; +} +.text-gray-800 { + color: #5a5c69 !important; +} +.text-gray-300 { + color: #dddfeb !important; +} +.text-xs { + font-size: .7rem; +} +.text-primary { + color: #4e73df !important; +} +a.text-primary:hover, a.text-primary:focus { + color: #224abe !important; +} +.text-uppercase, .dropdown .dropdown-menu .dropdown-header, .sidebar .sidebar-heading { + text-transform: uppercase !important; +} +.font-weight-bold { + font-weight: 700 !important; +} +.no-gutters { + margin-right: 0; + margin-left: 0; +} +.no-gutters > .col,.no-gutters > [class*="col-"] { + padding-right: 0; + padding-left: 0; +} +.col { + flex-basis: 0; + flex-grow: 1; + max-width: 100%; +} +.align-items-center { + align-items: center !important; +} +.mr-2,.mx-2 { + margin-right: 0.5rem !important; +} +label { + display: inline-block; +} +button { + border-radius: 0; +} +button:focus:not(:focus-visible) { + outline: 0; +} +button,input,optgroup,select,textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} +button,select { + text-transform: none; +} +select { + word-wrap: normal; +} +[type="button"],[type="reset"],[type="submit"],button { + -webkit-appearance: button; +} +[type="button"]:not(:disabled),[type="reset"]:not(:disabled),[type="submit"]:not(:disabled),button:not(:disabled) { + cursor: pointer; +} +::-moz-focus-inner { + padding: 0; + border-style: none; +} +.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl { + width: 100%; + padding-right: var(--bs-gutter-x, 0.75rem); + padding-left: var(--bs-gutter-x, 0.75rem); + margin-right: auto; + margin-left: auto; +} +@media (min-width: 576px) { + .container,.container-sm { + max-width: 540px; + } +} +@media (min-width: 768px) { + .container,.container-md,.container-sm { + max-width: 720px; + } +} +@media (min-width: 992px) { + .container,.container-lg,.container-md,.container-sm { + max-width: 960px; + } +} +@media (min-width: 1200px) { + .container,.container-lg,.container-md,.container-sm,.container-xl { + max-width: 1140px; + } +} +@media (min-width: 1400px) { + .container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl { + max-width: 1320px; + } +} +.dataTable-table,.table { + --bs-table-bg: transparent; + --bs-table-accent-bg: transparent; + --bs-table-striped-color: #212529; + --bs-table-striped-bg: rgba(0, 0, 0, 0.05); + --bs-table-active-color: #212529; + --bs-table-active-bg: rgba(0, 0, 0, 0.1); + --bs-table-hover-color: #212529; + --bs-table-hover-bg: #d8cba0; + width: 100%; + margin-bottom: 1rem; + color: #212529; + vertical-align: top; + border-color: #dee2e6; +} +.dataTable-table > :not(caption) > * > *,.table > :not(caption) > * > * { + padding: 0.5rem 0.5rem; + background-color: var(--bs-table-bg); + border-bottom-width: 1px; + box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg); +} +.dataTable-table > tbody,.table > tbody { + vertical-align: inherit; +} +.dataTable-table > thead,.table > thead { + vertical-align: bottom; +} +.dataTable-table > :not(:last-child) > :last-child > *,.table > :not(:last-child) > :last-child > * { + border-bottom-color: currentColor; +} +.caption-top { + caption-side: top; +} +.table-sm > :not(caption) > * > * { + padding: 0.25rem 0.25rem; +} +.dataTable-table > :not(caption) > *,.table-bordered > :not(caption) > * { + border-width: 1px 0; +} +.table-borderless > :not(caption) > * > * { + border-bottom-width: 0; +} +.table-striped > tbody > tr:nth-of-type(odd) { + --bs-table-accent-bg: var(--bs-table-striped-bg); + color: var(--bs-table-striped-color); +} +.table-active { + --bs-table-accent-bg: var(--bs-table-active-bg); + color: var(--bs-table-active-color); +} +.dataTable-table > tbody > tr:hover,.table-hover > tbody > tr:hover { + --bs-table-accent-bg: var(--bs-table-hover-bg); + color: var(--bs-table-hover-color); +} +.dataTable-wrapper .dataTable-container,.table-responsive { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + width: 100% !important; +} +@media (max-width: 575.98px) { + .table-responsive-sm { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 767.98px) { + .table-responsive-md { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 991.98px) { + .table-responsive-lg { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 1199.98px) { + .table-responsive-xl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 1399.98px) { + .table-responsive-xxl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +.dataTable-input,.form-control { + display: block; + width: 100%; + padding: 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ced4da; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: 0.25rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .dataTable-input,.form-control { + transition: none; + } +} +.form-control[type="file"],[type="file"].dataTable-input { + overflow: hidden; +} +.form-control[type="file"]:not(:disabled):not([readonly]),[type="file"].dataTable-input:not(:disabled):not([readonly]) { + cursor: pointer; +} +.dataTable-input:focus,.form-control:focus { + color: #212529; + background-color: #fff; + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.dataTable-input::-webkit-date-and-time-value,.form-control::-webkit-date-and-time-value { + height: 1.5em; +} +.dataTable-input::-moz-placeholder,.form-control::-moz-placeholder { + color: #6c757d; + opacity: 1; +} +.dataTable-input:-ms-input-placeholder,.form-control:-ms-input-placeholder { + color: #6c757d; + opacity: 1; +} +.dataTable-input::placeholder,.form-control::placeholder { + color: #6c757d; + opacity: 1; +} +.dataTable-selector,.form-select { + display: block; + width: 100%; + padding: 0.375rem 2.25rem 0.375rem 0.75rem; + -moz-padding-start: calc(0.75rem - 3px); + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 0.75rem center; + background-size: 16px 12px; + border: 1px solid #ced4da; + border-radius: 0.25rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} +@media (prefers-reduced-motion: reduce) { + .dataTable-selector,.form-select { + transition: none; + } +} +.dataTable-selector:focus,.form-select:focus { + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.btn { + display: inline-block; + font-weight: 400; + line-height: 1.5; + color: #212529; + text-align: center; + text-decoration: none; + vertical-align: middle; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-color: transparent; + border: 1px solid transparent; + padding: 0.375rem 0.75rem; + font-size: 1rem; + border-radius: 0.25rem; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .btn { + transition: none; + } +} +.btn:hover { + color: #212529; +} +.btn-check:focus + .btn,.btn:focus { + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.btn-link { + font-weight: 400; + color: #0d6efd; + text-decoration: underline; +} +.btn-link:hover { + color: #0a58ca; +} +.btn-group-sm > .btn,.btn-sm { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.2rem; +} +.nav { + display: flex; + flex-wrap: wrap; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} +.nav-link { + display: block; + padding: 0.5rem 1rem; + color: #0d6efd; + text-decoration: none; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,border-color 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .nav-link { + transition: none; + } +} +.nav-link:focus,.nav-link:hover { + color: #0a58ca; +} +.navbar { + position: relative; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} +.navbar-brand { + padding-top: 0.3125rem; + padding-bottom: 0.3125rem; + margin-right: 1rem; + font-size: 1.25rem; + text-decoration: none; + white-space: nowrap; +} +.navbar-expand { + flex-wrap: nowrap; + justify-content: flex-start; +} +.navbar-dark .navbar-brand { + color: #fff; +} +.card { + position: relative; + display: flex; + flex-direction: column; + min-width: 0; + word-wrap: break-word; + background-color: #fff; + background-clip: border-box; + border-radius: 0.25rem; +} +.card-body { + flex: 1 1 auto; + min-height: 1px; + padding: 1rem 1rem; +} +/*.card-body { + flex: 1 1 auto; + min-height: 1px; + padding: 1.25rem; +} +*/ +.breadcrumb { + display: flex; + flex-wrap: wrap; + padding: 0 0; + margin-bottom: 1rem; + list-style: none; +} +.breadcrumb-item + .breadcrumb-item { + padding-left: 0.5rem; +} +.breadcrumb-item + .breadcrumb-item::before { + float: left; + padding-right: 0.5rem; + color: #6c757d; + content: var(--bs-breadcrumb-divider, "/"); +} +.breadcrumb-item.active { + color: #6c757d; +} +.dataTable-pagination ul,.pagination { + display: flex; + padding-left: 0; + list-style: none; +} +.dataTable-pagination a,.page-link { + position: relative; + display: block; + color: #0d6efd; + text-decoration: none; + background-color: #fff; + border: 1px solid #dee2e6; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .dataTable-pagination a,.page-link { + transition: none; + } +} +.dataTable-pagination a:hover,.page-link:hover { + z-index: 2; + color: #0a58ca; + background-color: #e9ecef; + border-color: #dee2e6; +} +.dataTable-pagination a:focus,.page-link:focus { + z-index: 3; + color: #0a58ca; + background-color: #e9ecef; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.dataTable-pagination .page-item:not(:first-child) a,.dataTable-pagination li:not(:first-child) .page-link,.dataTable-pagination li:not(:first-child) a,.page-item:not(:first-child) .dataTable-pagination a,.page-item:not(:first-child) .page-link { + margin-left: -1px; +} +.dataTable-pagination .page-item.active a,.dataTable-pagination li.active .page-link,.dataTable-pagination li.active a,.page-item.active .dataTable-pagination a,.page-item.active .page-link { + z-index: 3; + color: #fff; + background-color: #0d6efd; + border-color: #0d6efd; +} +.dataTable-pagination .page-item.disabled a,.dataTable-pagination li.disabled .page-link,.dataTable-pagination li.disabled a,.page-item.disabled .dataTable-pagination a,.page-item.disabled .page-link { + color: #6c757d; + pointer-events: none; + background-color: #fff; + border-color: #dee2e6; +} +.dataTable-pagination a,.page-link { + padding: 0.375rem 0.75rem; +} +.dataTable-pagination .page-item:first-child a,.dataTable-pagination li:first-child .page-link,.dataTable-pagination li:first-child a,.page-item:first-child .dataTable-pagination a,.page-item:first-child .page-link { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; +} +.dataTable-pagination .page-item:last-child a,.dataTable-pagination li:last-child .page-link,.dataTable-pagination li:last-child a,.page-item:last-child .dataTable-pagination a,.page-item:last-child .page-link { + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; +} +.dataTable-pagination .pagination-lg a,.pagination-lg .dataTable-pagination a,.pagination-lg .page-link { + padding: 0.75rem 1.5rem; + font-size: 1.25rem; +} +.dataTable-pagination .pagination-lg .page-item:first-child a,.dataTable-pagination .pagination-lg li:first-child .page-link,.dataTable-pagination .pagination-lg li:first-child a,.pagination-lg .dataTable-pagination li:first-child .page-link,.pagination-lg .dataTable-pagination li:first-child a,.pagination-lg .page-item:first-child .dataTable-pagination a,.pagination-lg .page-item:first-child .page-link { + border-top-left-radius: 0.3rem; + border-bottom-left-radius: 0.3rem; +} +.dataTable-pagination .pagination-lg .page-item:last-child a,.dataTable-pagination .pagination-lg li:last-child .page-link,.dataTable-pagination .pagination-lg li:last-child a,.pagination-lg .dataTable-pagination li:last-child .page-link,.pagination-lg .dataTable-pagination li:last-child a,.pagination-lg .page-item:last-child .dataTable-pagination a,.pagination-lg .page-item:last-child .page-link { + border-top-right-radius: 0.3rem; + border-bottom-right-radius: 0.3rem; +} +.dataTable-pagination .pagination-sm a,.pagination-sm .dataTable-pagination a,.pagination-sm .page-link { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; +} +.dataTable-pagination .pagination-sm .page-item:first-child a,.dataTable-pagination .pagination-sm li:first-child .page-link,.dataTable-pagination .pagination-sm li:first-child a,.pagination-sm .dataTable-pagination li:first-child .page-link,.pagination-sm .dataTable-pagination li:first-child a,.pagination-sm .page-item:first-child .dataTable-pagination a,.pagination-sm .page-item:first-child .page-link { + border-top-left-radius: 0.2rem; + border-bottom-left-radius: 0.2rem; +} +.dataTable-pagination .pagination-sm .page-item:last-child a,.dataTable-pagination .pagination-sm li:last-child .page-link,.dataTable-pagination .pagination-sm li:last-child a,.pagination-sm .dataTable-pagination li:last-child .page-link,.pagination-sm .dataTable-pagination li:last-child a,.pagination-sm .page-item:last-child .dataTable-pagination a,.pagination-sm .page-item:last-child .page-link { + border-top-right-radius: 0.2rem; + border-bottom-right-radius: 0.2rem; +} +.fixed-top,.sb-nav-fixed #layoutSidenav #layoutSidenav_nav,.sb-nav-fixed .sb-topnav { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: 1030; +} +.fixed-bottom { + position: fixed; + right: 0; + bottom: 0; + left: 0; + z-index: 1030; +} +.sticky-top { + position: sticky; + top: 0; + z-index: 1020; +} +.order-first { + order: -1 !important; +} +.order-0 { + order: 0 !important; +} +.order-1 { + order: 1 !important; +} +.order-2 { + order: 2 !important; +} +.order-3 { + order: 3 !important; +} +.order-4 { + order: 4 !important; +} +.order-5 { + order: 5 !important; +} +.order-last { + order: 6 !important; +} +.mt-0 { + margin-top: 0 !important; +} +.mt-1 { + margin-top: 0.25rem !important; +} +.mt-2 { + margin-top: 0.5rem !important; +} +.mt-3 { + margin-top: 1rem !important; +} +.mt-4 { + margin-top: 1.5rem !important; +} +.mt-5 { + margin-top: 3rem !important; +} +.mt-auto { + margin-top: auto !important; +} +.me-0 { + margin-right: 0 !important; +} +.me-1 { + margin-right: 0.25rem !important; +} +.me-2 { + margin-right: 0.5rem !important; +} +.me-3 { + margin-right: 1rem !important; +} +.me-4 { + margin-right: 1.5rem !important; +} +.me-5 { + margin-right: 3rem !important; +} +.me-auto { + margin-right: auto !important; +} +.mb-0 { + margin-bottom: 0 !important; +} +.mb-1 { + margin-bottom: 0.25rem !important; +} +.mb-2 { + margin-bottom: 0.5rem !important; +} +.mb-3 { + margin-bottom: 1rem !important; +} +.mb-4 { + margin-bottom: 1.5rem !important; +} +.mb-5 { + margin-bottom: 3rem !important; +} +.mb-auto { + margin-bottom: auto !important; +} +.px-0 { + padding-right: 0 !important; + padding-left: 0 !important; +} +.px-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; +} +.px-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; +} +.px-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; +} +.px-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; +} +.px-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; +} +.ps-0 { + padding-left: 0 !important; +} +.ps-1 { + padding-left: 0.25rem !important; +} +.ps-2 { + padding-left: 0.5rem !important; +} +.ps-3 { + padding-left: 1rem !important; +} +.ps-4 { + padding-left: 1.5rem !important; +} +.ps-5 { + padding-left: 3rem !important; +} +.bg-dark { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important; +} +body,html { + height: 100%; +} +#layoutSidenav { + display: flex; +} +#layoutSidenav #layoutSidenav_nav { + flex-basis: 225px; + flex-shrink: 0; + transition: transform 0.15s ease-in-out; + z-index: 1038; + transform: translateX(-225px); +} +#layoutSidenav #layoutSidenav_content { + position: relative; + display: flex; + flex-direction: column; + justify-content: space-between; + min-width: 0; + flex-grow: 1; + min-height: calc(100vh - 56px); + margin-left: -225px; +} +.sb-sidenav-toggled #layoutSidenav #layoutSidenav_nav { + transform: translateX(0); +} +.sb-sidenav-toggled #layoutSidenav #layoutSidenav_content:before { + content: ""; + display: block; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: #000; + z-index: 1037; + opacity: 0.5; + transition: opacity 0.3s ease-in-out; +} +@media (min-width: 992px) { + #layoutSidenav #layoutSidenav_nav { + transform: translateX(0); + } + #layoutSidenav #layoutSidenav_content { + margin-left: 0; + transition: margin 0.15s ease-in-out; + } + .sb-sidenav-toggled #layoutSidenav #layoutSidenav_nav { + transform: translateX(-225px); + } + .sb-sidenav-toggled #layoutSidenav #layoutSidenav_content { + margin-left: -225px; + } + .sb-sidenav-toggled #layoutSidenav #layoutSidenav_content:before { + display: none; + } +} +.sb-nav-fixed .sb-topnav { + z-index: 1039; +} +.sb-nav-fixed #layoutSidenav #layoutSidenav_nav { + width: 225px; + height: 100vh; + z-index: 1038; +} +.sb-nav-fixed #layoutSidenav #layoutSidenav_nav .sb-sidenav { + padding-top: 56px; +} +.sb-nav-fixed #layoutSidenav #layoutSidenav_nav .sb-sidenav .sb-sidenav-menu { + overflow-y: auto; +} +.sb-nav-fixed #layoutSidenav #layoutSidenav_content { + padding-left: 225px; + top: 56px; +} +.nav .nav-link .sb-nav-link-icon,.sb-sidenav-menu .nav-link .sb-nav-link-icon { + margin-right: 0.5rem; +} +.sb-topnav { + padding-left: 0; + height: 56px; + z-index: 1039; +} +.sb-topnav .navbar-brand { + width: 225px; + margin: 0; +} +.sb-topnav.navbar-dark #sidebarToggle { + color: rgba(255, 255, 255, 0.5); +} +.sb-sidenav { + display: flex; + flex-direction: column; + height: 100%; + flex-wrap: nowrap; +} +.sb-sidenav .sb-sidenav-menu { + flex-grow: 1; +} +.sb-sidenav .sb-sidenav-menu .nav { + flex-direction: column; + flex-wrap: nowrap; +} +.sb-sidenav .sb-sidenav-menu .nav .sb-sidenav-menu-heading { + padding: 1.75rem 1rem 0.75rem; + font-size: 0.75rem; + font-weight: 700; + text-transform: uppercase; +} +.sb-sidenav .sb-sidenav-menu .nav .nav-link { + display: flex; + align-items: center; + padding-top: 0.75rem; + padding-bottom: 0.75rem; + position: relative; +} +.sb-sidenav .sb-sidenav-menu .nav .nav-link .sb-nav-link-icon { + font-size: 0.9rem; +} +.sb-sidenav .sb-sidenav-menu .nav .nav-link .sb-sidenav-collapse-arrow { + display: inline-block; + margin-left: auto; + transition: transform 0.15s ease; +} +.sb-sidenav.sb-sidenav-menu.nav.nav-link.collapsed.sb-sidenav-collapse-arrow { + transform: rotate(-90deg); +} +.sb-sidenav .sb-sidenav-menu .nav .sb-sidenav-menu-nested { + margin-left: 1.5rem; + flex-direction: column; +} +.sb-sidenav .sb-sidenav-footer { + padding: 0.75rem; + flex-shrink: 0; +} +.sb-sidenav-dark { + background-color: #212529; + color: rgba(255, 255, 255, 0.5); +} +.sb-sidenav-dark .sb-sidenav-menu .sb-sidenav-menu-heading { + color: rgba(255, 255, 255, 0.25); +} +.sb-sidenav-dark .sb-sidenav-menu .nav-link { + color: rgba(255, 255, 255, 0.5); +} +.sb-sidenav-dark .sb-sidenav-menu .nav-link .sb-nav-link-icon { + color: rgba(255, 255, 255, 0.25); +} +.sb-sidenav-dark .sb-sidenav-menu .nav-link .sb-sidenav-collapse-arrow { + color: rgba(255, 255, 255, 0.25); +} +.sb-sidenav-dark .sb-sidenav-menu .nav-link:hover { + color: #fff; +} +.sb-sidenav-dark .sb-sidenav-menu .nav-link.active { + color: #fff; +} +.sb-sidenav-dark .sb-sidenav-menu .nav-link.active .sb-nav-link-icon { + color: #fff; +} +.sb-sidenav-dark .sb-sidenav-footer { + background-color: #343a40; +} +.dataTable-wrapper .dataTable-container { + font-size: 0.875rem; +} +.dataTable-wrapper.no-header .dataTable-container { + border-top: none; +} +.dataTable-wrapper.no-footer .dataTable-container { + border-bottom: none; + border-top-left-radius: 15px; + border-top-right-radius: 15px; +} +.dataTable-top { + padding: 0 0 1rem; +} +.dataTable-bottom { + padding: 0; +} +.dataTable-bottom > div:first-child,.dataTable-bottom > nav:first-child,.dataTable-top > div:first-child,.dataTable-top > nav:first-child { + float: left; +} +.dataTable-bottom > div:last-child,.dataTable-bottom > nav:last-child,.dataTable-top > div:last-child,.dataTable-top > nav:last-child { + float: right; +} +.dataTable-selector { + width: auto; + display: inline-block; + padding-left: 1.125rem; + padding-right: 2.125rem; + margin-right: 0.25rem; +} +.dataTable-info { + margin: 7px 0; +} +.dataTable-pagination a:hover { + background-color: #e9ecef; +} +.dataTable-pagination .active a,.dataTable-pagination .active a:focus,.dataTable-pagination .active a:hover { + background-color: #0d6efd; +} +.dataTable-pagination .disabled a,.dataTable-pagination .disabled a:focus,.dataTable-pagination .disabled a:hover,.dataTable-pagination .ellipsis a { + cursor: not-allowed; +} +.dataTable-pagination .disabled a,.dataTable-pagination .disabled a:focus,.dataTable-pagination .disabled a:hover { + cursor: not-allowed; + opacity: 0.4; +} +.dataTable-pagination .pager a { + font-weight: 700; +} +.dataTable-table { + border-collapse: collapse; +} +.dataTable-table > tbody > tr > td,.dataTable-table > tbody > tr > th,.dataTable-table > tfoot > tr > td,.dataTable-table > tfoot > tr > th,.dataTable-table > thead > tr > td,.dataTable-table > thead > tr > th { + vertical-align: top; + padding: 0.5rem 0.5rem; +} +.dataTable-table > thead > tr > th { + vertical-align: bottom; + text-align: left; + border-bottom: none; +} +.dataTable-table thead tr { + background-color: rgb(35 115 212); + color: #fff; + text-align: left; +} +.dataTable-table tbody tr { + border-bottom: 1px solid #ddd; +} +.dataTable-table tbody tr:nth-of-type(even) { + background-color: #f3f3f3; +} +.dataTable-table tbody tr:last-of-type { + border-bottom: 5px solid rgb(35 115 212); +} +.dataTable-table > tfoot > tr > th { + vertical-align: bottom; + text-align: left; +} +.dataTable-table th { + vertical-align: bottom; + text-align: left; +} +.dataTable-table th a { + text-decoration: none; + color: inherit; +} +.dataTable-sorter { + display: inline-block; + height: 100%; + position: relative; + width: 100%; + padding-right: 1rem; +} +.dataTable-sorter::after,.dataTable-sorter::before { + content: ""; + height: 0; + width: 0; + position: absolute; + right: 4px; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + opacity: 0.2; +} +.dataTable-sorter::before { + bottom: 4px; +} +.dataTable-sorter::after { + top: 0; +} +.asc .dataTable-sorter::after,.desc .dataTable-sorter::before { + opacity: 0.6; +} +.dataTables-empty { + text-align: center; +} +.dataTable-bottom::after,.dataTable-top::after { + clear: both; + content: " "; + display: table; +} +.btn-datatable { + height: 20px !important; + width: 20px !important; + font-size: 0.75rem; + border-radius: 0.25rem !important; +} +/** Custom loader screen to add some flare to the report* https://ihatetomatoes.net/create-custom-preloading-screen/*/ +#loader-wrapper { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1000; +} +#loader { + display: block; + position: relative; + left: 50%; + top: 50%; + width: 150px; + height: 150px; + margin: -75px 0 0 -75px; + border-radius: 50%; + border: 3px solid transparent; + border-top-color: #3498db; + -webkit-animation: spin 2s linear infinite; + animation: spin 2s linear infinite; + z-index: 1001; +} +#loader:before { + content: ""; + position: absolute; + top: 5px; + left: 5px; + right: 5px; + bottom: 5px; + border-radius: 50%; + border: 3px solid transparent; + border-top-color: #e74c3c; + -webkit-animation: spin 3s linear infinite; + animation: spin 3s linear infinite; +} +#loader:after { + content: ""; + position: absolute; + top: 15px; + left: 15px; + right: 15px; + bottom: 15px; + border-radius: 50%; + border: 3px solid transparent; + border-top-color: #f9c922; + -webkit-animation: spin 1.5s linear infinite; + animation: spin 1.5s linear infinite; +} +@-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + } + 100% { + -webkit-transform: rotate(360deg); + -ms-transform: rotate(360deg); + transform: rotate(360deg); + } +} +@keyframes spin { + 0% { + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + } + 100% { + -webkit-transform: rotate(360deg); + -ms-transform: rotate(360deg); + transform: rotate(360deg); + } +} +#loader-wrapper .loader-section { + position: fixed; + top: 0; + width: 51%; + height: 100%; + background: #222; + z-index: 1000; +} +#loader-wrapper .loader-section.section-left { + left: 0; +} +#loader-wrapper .loader-section.section-right { + right: 0; +} +.loaded #loader-wrapper .loader-section.section-left { + -webkit-transform: translateX(-100%); + -ms-transform: translateX(-100%); + transform: translateX(-100%); + -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); + transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); +} +.loaded #loader-wrapper .loader-section.section-right { + -webkit-transform: translateX(100%); + -ms-transform: translateX(100%); + transform: translateX(100%); + -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); + transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); +} +.loaded #loader { + opacity: 0; + -webkit-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; +} +.loaded #loader-wrapper { + visibility: hidden; + -webkit-transform: translateY(-100%); + -ms-transform: translateY(-100%); + transform: translateY(-100%); + -webkit-transition: all 0.3s 1s ease-out; + transition: all 0.3s 1s ease-out; +} +/* Table styles */ +table.dataTable { + width: 100%; + margin: 0 auto; + clear: both; + border-collapse: separate; + border-spacing: 0; +} +table.dataTable thead th,table.dataTable tfoot th { + font-weight: bold; +} +.dataTables_scrollHeadInner{ + width: 100% !important; +} +.dataTable-table dataTable no-footer{ + width: 100% !important; +} +/*table.dataTable thead th,table.dataTable thead td { + /*padding: 10px 18px; + */ + /*border-bottom: 1px solid #111; +} +*/ +table.dataTable thead { + width: 100% !important; +} +/* Adds round border at full screen*/ +table.dataTable thead th:first-child,table.dataTable thead td { + border-top-left-radius: 15px; +} +/* Adds round border at full screen*/ +table.dataTable thead th:last-child,table.dataTable thead td { + border-top-right-radius: 15px; +} +table.dataTable thead th:active,table.dataTable thead td:active { + outline: none; +} +table.dataTable tfoot th,table.dataTable tfoot td { + padding: 10px 18px 6px 18px; + border-top: 1px solid #111; +} +table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled { + cursor: pointer; + *cursor: hand; + background-repeat: no-repeat; + background-position: center right; +} +table.dataTable tbody tr { + background-color: #ffffff; +} +table.dataTable tbody tr.selected { + background-color: #B0BED9; +} +table.dataTable tbody th,table.dataTable tbody td { + padding: 8px 10px; +} +table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td { + border-top: 1px solid #ddd; +} +table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td { + border-top: none; +} +table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td { + border-top: 1px solid #ddd; + border-right: 1px solid #ddd; +} +table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child { + border-left: 1px solid #ddd; +} +table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td { + border-top: none; +} +table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd { + background-color: #f9f9f9; +} +table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected { + background-color: #acbad4; +} +table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { + background-color: #f6f6f6; +} +table.dataTable.hover tbody tr:hover.selected, table.dataTable.display tbody tr:hover.selected { + background-color: #aab7d1; +} +table.dataTable.order-column tbody tr > .sorting_1,table.dataTable.order-column tbody tr > .sorting_2,table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1,table.dataTable.display tbody tr > .sorting_2,table.dataTable.display tbody tr > .sorting_3 { + background-color: #fafafa; +} +table.dataTable.order-column tbody tr.selected > .sorting_1,table.dataTable.order-column tbody tr.selected > .sorting_2,table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1,table.dataTable.display tbody tr.selected > .sorting_2,table.dataTable.display tbody tr.selected > .sorting_3 { + background-color: #acbad5; +} +table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 { + background-color: #f1f1f1; +} +table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 { + background-color: #f3f3f3; +} +table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 { + background-color: whitesmoke; +} +table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 { + background-color: #a6b4cd; +} +table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 { + background-color: #a8b5cf; +} +table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 { + background-color: #a9b7d1; +} +table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 { + background-color: #fafafa; +} +table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 { + background-color: #fcfcfc; +} +table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 { + background-color: #fefefe; +} +table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 { + background-color: #acbad5; +} +table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 { + background-color: #aebcd6; +} +table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 { + background-color: #afbdd8; +} +table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1 { + background-color: #eaeaea; +} +table.dataTable.display tbody tr:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2 { + background-color: #ececec; +} +table.dataTable.display tbody tr:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3 { + background-color: #efefef; +} +table.dataTable.display tbody tr:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 { + background-color: #a2aec7; +} +table.dataTable.display tbody tr:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 { + background-color: #a3b0c9; +} +table.dataTable.display tbody tr:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 { + background-color: #a5b2cb; +} +/*table.dataTable.no-footer { + /*border-bottom: 1px solid #111; +} +*/ +table.dataTable.nowrap th, table.dataTable.nowrap td { + white-space: nowrap; +} +table.dataTable.compact thead th,table.dataTable.compact thead td { + padding: 4px 17px; +} +table.dataTable.compact tfoot th,table.dataTable.compact tfoot td { + padding: 4px; +} +table.dataTable.compact tbody th,table.dataTable.compact tbody td { + padding: 4px; +} +table.dataTable th.dt-left,table.dataTable td.dt-left { + text-align: left; +} +table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty { + text-align: center; +} +table.dataTable th.dt-right,table.dataTable td.dt-right { + text-align: right; +} +table.dataTable th.dt-justify,table.dataTable td.dt-justify { + text-align: justify; +} +table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap { + white-space: nowrap; +} +table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left { + text-align: left; +} +table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center { + text-align: center; +} +table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right { + text-align: right; +} +table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify { + text-align: justify; +} +table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap { + white-space: nowrap; +} +table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left { + text-align: left; +} +table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center { + text-align: center; +} +table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right { + text-align: right; +} +table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify { + text-align: justify; +} +table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap { + white-space: nowrap; +} +table.dataTable,table.dataTable th,table.dataTable td { + box-sizing: content-box; + font-size: 14px; +} +/** Control feature layout*/ +.dataTables_wrapper { + position: relative; + clear: both; + *zoom: 1; + zoom: 1; +} +.dataTables_wrapper .dataTables_length { + float: left; +} +.dataTables_wrapper .dataTables_filter { + float: right; + text-align: right; + padding-bottom: 5px; +} +.dataTables_wrapper .dataTables_filter input { + margin-left: 0.5em; +} +.dataTables_wrapper .dataTables_info { + clear: both; + float: left; + padding-top: 0.755em; +} +.dataTables_wrapper .dataTables_paginate { + float: right; + text-align: right; + /*padding-top: 0.25em; + */ +} +.dataTables_wrapper .dataTables_paginate .paginate_button { + box-sizing: border-box; + display: inline-block; + min-width: 1.5em; + /*padding: 0.5em 1em; + */ + /*margin-left: 2px; + */ + text-align: center; + text-decoration: none !important; + cursor: pointer; + *cursor: hand; + color: #333 !important; + /*border: 1px solid transparent; + */ + border-radius: 2px; +} +.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { + color: #333 !important; + border: 1px solid #979797; + background-color: white; + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, #dcdcdc)); + /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, white 0%, #dcdcdc 100%); + /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, white 0%, #dcdcdc 100%); + /* FF3.6+ */ + background: -ms-linear-gradient(top, white 0%, #dcdcdc 100%); + /* IE10+ */ + background: -o-linear-gradient(top, white 0%, #dcdcdc 100%); + /* Opera 11.10+ */ + background: linear-gradient(to bottom, white 0%, #dcdcdc 100%); + /* W3C */ +} +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active { + cursor: default; + color: #666 !important; + /*border: 1px solid transparent; + */ + background: transparent; + box-shadow: none; +} +.dataTables_wrapper .dataTables_paginate .paginate_button:hover { + color: white !important; + /*border: 1px solid #111; + */ + background-color: #585858; + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111)); + /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #585858 0%, #111 100%); + /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #585858 0%, #111 100%); + /* FF3.6+ */ + background: -ms-linear-gradient(top, #585858 0%, #111 100%); + /* IE10+ */ + background: -o-linear-gradient(top, #585858 0%, #111 100%); + /* Opera 11.10+ */ + background: linear-gradient(to bottom, #585858 0%, #111 100%); + /* W3C */ +} +.dataTables_wrapper .dataTables_paginate .paginate_button:active { + outline: none; + background-color: #2b2b2b; + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c)); + /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); + /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); + /* FF3.6+ */ + background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); + /* IE10+ */ + background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); + /* Opera 11.10+ */ + background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%); + /* W3C */ + box-shadow: inset 0 0 3px #111; +} +.dataTables_wrapper .dataTables_paginate .ellipsis { + padding: 0 1em; +} +.dataTables_wrapper .dataTables_processing { + position: absolute; + top: 50%; + left: 50%; + width: 100%; + height: 40px; + margin-left: -50%; + margin-top: -25px; + padding-top: 20px; + text-align: center; + font-size: 1.2em; + background-color: white; + background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0))); + background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); +} +.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate { + color: #333; +} +.dataTables_wrapper .dataTables_scroll { + clear: both; + /*box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + box-shadow: 0px 25px 20px -25px rgba(0, 0, 0, 0.2), 25px 0px 20px -25px rgba(0, 0, 0, 0.19); + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + -webkit-box-shadow: 20px 20px 10px -10px rgba(184,184,184,0.1); + -moz-box-shadow: 20px 20px 10px -10px rgba(184,184,184,0.1); + box-shadow: 20px 20px 10px -10px rgba(184,184,184,0.1); + */ +} +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody { + *margin-top: -1px; + -webkit-overflow-scrolling: touch; +} +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td { + vertical-align: middle; +} +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th > div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td > div.dataTables_sizing, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th > div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td > div.dataTables_sizing { + height: 0; + overflow: hidden; + margin: 0 !important; + padding: 0 !important; +} +.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable { + width: 100% !important; +} +.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,.dataTables_wrapper.no-footer div.dataTables_scrollBody > table { + border-bottom: none; + /*border-top-right-radius: 15px; + */ +} +.dataTables_wrapper:after { + visibility: hidden; + display: block; + content: ""; + clear: both; + height: 0; +} +@media screen and (max-width: 767px) { + .dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate { + float: none; + text-align: center; + } + .dataTables_wrapper .dataTables_paginate { + margin-top: 0.5em; + } +} +@media screen and (max-width: 640px) { + .dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter { + float: none; + text-align: center; + } + .dataTables_wrapper .dataTables_filter { + margin-top: 0.5em; + } +} diff --git a/examples/Get-PokeAgentReport/Get-PokeAgentReport.ps1 b/examples/Get-PokeAgentReport/Get-PokeAgentReport.ps1 new file mode 100644 index 0000000..f13cf20 --- /dev/null +++ b/examples/Get-PokeAgentReport/Get-PokeAgentReport.ps1 @@ -0,0 +1,380 @@ +<# + .SYNOPSIS + Gets a BCDR agent report from the Poke API. + + .DESCRIPTION + The Get-PokeAgentReport script gets a BCDR agent report from the Poke API. + + Can be run against a single BCDR device or all BCDR devices registered in the Poke portal + + This is a proof of concept script. It is not intended to be used in production. + + .PARAMETER Api_Key_Public + Defines your Poke API public key. + + .PARAMETER Api_Key_Secret + Defines your Poke API secret key. + + .PARAMETER APIEndPoint + Define what Poke endpoint to connect to. + + The default is https://pokeapi.co/api/v2 + + .PARAMETER serialNumber + Defines the BCDR's serial number that should be returned. + + This is optional. If not specified, all BCDR agents will be returned. + + .PARAMETER Report + Defines if the script should output the results to a CSV, HTML or Both. + + .PARAMETER ShowReport + Switch statement to open the report folder after the script runs. + + .EXAMPLE + Get-PokeAgentReport -Api_Key_Public 12345 -Api_Key_Secret 12345 + + Gets all BCDR agents from every registered BCDR in the Poke portal. + + Returned data is outputted to a CSV file. + + .EXAMPLE + Get-PokeAgentReport -Api_Key_Public 12345 -Api_Key_Secret 12345 -serialNumber 1234567890 + + Gets BCDR agents from the defined BCDR. + + Returned data is outputted to a CSV file. + + .EXAMPLE + Get-PokeAgentReport -Api_Key_Public 12345 -Api_Key_Secret 12345 -Report All + + Gets all BCDR agents from every registered BCDR in the Poke portal. + + Returned data is outputted to both a CSV & HTML file. + + .NOTES + N\A + + .LINK + https://celerium.org/ + + .LINK + https://github.com/Celerium/PokeAPI-PowerShellWrapper + +#> + +#Requires -Version 5.1 + +#Region [ Parameters ] + + [CmdletBinding()] + param( + [Parameter(Mandatory=$True)] + [string]$Api_Key_Public, + + [Parameter(Mandatory=$True)] + [string]$Api_Key_Secret, + + [Parameter(Mandatory=$false)] + $APIEndpoint = 'https://pokeapi.co/api/v2', + + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [string]$serialNumber, + + [Parameter(Mandatory=$false)] + [ValidateSet('All','CSV','HTML')] + [String]$Report = 'CSV', + + [Parameter(Mandatory=$false)] + [Switch]$ShowReport + + ) + +#EndRegion [ Parameters ] + +'' +Write-Output "Start - $(Get-Date -Format yyyy-MM-dd-HH:mm)" +'' + +#Region [ Prerequisites ] + + $ScriptName = 'Get-PokeAgentReport' + $ReportFolderName = "$ScriptName-Report" + $FileDate = Get-Date -Format 'yyyy-MM-dd-HHmm' + $HTMLDate = (Get-Date -Format 'yyyy-MM-dd h:mmtt').ToLower() + + #Install Poke Module + Try { + If(Get-PackageProvider -ListAvailable -Name NuGet -ErrorAction Stop){} + Else{ + Install-PackageProvider -Name NuGet -Confirm:$False + } + + If(Get-Module -ListAvailable -Name PokeAPI) { + Import-module PokeAPI -ErrorAction Stop + } + Else { + Install-Module PokeAPI -Force -ErrorAction Stop + Import-Module PokeAPI -ErrorAction Stop + } + } + Catch { + Write-Error $_ + break + } + + + #Settings Poke login information + Add-PokeBaseURI -base_uri $APIEndpoint + Add-PokeAPIKey -Api_Key_Public $Api_Key_Public -Api_Key_Secret $Api_Key_Secret -ErrorAction Stop + + + #Define & create logging location + Try{ + + $Log = "C:\Audits\$ReportFolderName" + + If ($Report -ne 'Console'){ + $CSVReport = "$Log\$ScriptName-$FileDate.csv" + $HTMLReport = "$Log\$ScriptName-$FileDate.html" + + If ((Test-Path -Path $Log -PathType Container) -eq $false){ + New-Item -Path $Log -ItemType Directory > $Null + } + } + } + Catch{ + Write-Host $_.Exception.Message -ForegroundColor Red -BackgroundColor Black + '' + Write-Error $_ + break + } + +#EndRegion [ Prerequisites ] + +Write-Output " - (1/3) - $(Get-Date -Format MM-dd-HH:mm) - Getting Poke agents from the API" + +#Region [ Poke API ] + + #Customize the results + Try{ + + if ($serialNumber){ + + $PokeBCDR = Get-PokeDevice -serialNumber $serialNumber + $PokeAgents = (Get-PokeAgent -serialNumber $serialNumber).items + + $PokeAgentResults = $PokeAgents | Select-Object ` + @{Name='resellerCompanyName';Expression={$PokeBCDR.resellerCompanyName}}, ` + @{Name='clientCompanyName';Expression={$PokeBCDR.clientCompanyName}}, ` + @{Name='BCDR';Expression={$PokeBCDR.Name}}, ` + @{Name='BCDRip';Expression={$PokeBCDR.internalIP}}, ` + @{Name='Model';Expression={$PokeBCDR.Model}}, ` + @{Name='serialNumber';Expression={$PokeBCDR.serialNumber}}, ` + @{Name='Agent';Expression={$_.name}}, ` + @{Name='AgentOS';Expression={$_.os}}, ` + @{Name='AgentVersion';Expression={$_.AgentVersion}}, ` + @{Name='AgentIP';Expression={$_.localIp}}, ` + @{Name='protectedVolumesCount';Expression={$_.protectedVolumesCount}}, ` + @{Name='unprotectedVolumesCount';Expression={$_.unprotectedVolumesCount}}, ` + @{Name='protectedVolumeNames';Expression={$_.protectedVolumeNames}}, ` + @{Name='unprotectedVolumeNames';Expression={$_.unprotectedVolumeNames}}, ` + @{Name='localSnapshots';Expression={$_.localSnapshots}}, ` + @{Name='latestOffsite';Expression={ (([System.DateTimeOffset]::FromUnixTimeSeconds($_.latestOffsite)).DateTime).ToString('yyyy-MM-dd-HHmm') }}, ` + @{Name='lastSnapshot';Expression={ (([System.DateTimeOffset]::FromUnixTimeSeconds($_.lastSnapshot)).DateTime).ToString('yyyy-MM-dd-HHmm') }}, ` + @{Name='lastScreenshotAttempt';Expression={ (([System.DateTimeOffset]::FromUnixTimeSeconds($_.lastScreenshotAttempt)).DateTime).ToString('yyyy-MM-dd-HHmm') }}, ` + @{Name='lastScreenshotAttemptStatus';Expression={$_.lastScreenshotAttemptStatus}}, ` + @{Name='isPaused';Expression={$_.isPaused}}, ` + @{Name='isArchived';Expression={$_.isArchived}}, ` + @{Name='volume';Expression={$_.volume}}, ` + @{Name='lastScreenshotUrl';Expression={$_.lastScreenshotUrl}}, ` + @{Name='backups';Expression={$_.backups}} + + + } + else{ + + $PokeBCDR = (Get-PokeDevice).items + $PokeAgentResults = ForEach ($BCDR in $PokeBCDR){ + + $Agents = (Get-PokeAgent -serialNumber $BCDR.serialNumber).items + + $Agents | Select-Object ` + @{Name='resellerCompanyName';Expression={$BCDR.resellerCompanyName}}, ` + @{Name='clientCompanyName';Expression={$BCDR.clientCompanyName}}, ` + @{Name='BCDR';Expression={$BCDR.Name}}, ` + @{Name='BCDRip';Expression={$BCDR.internalIP}}, ` + @{Name='Model';Expression={$BCDR.Model}}, ` + @{Name='serialNumber';Expression={$BCDR.serialNumber}}, ` + @{Name='Agent';Expression={$_.name}}, ` + @{Name='AgentOS';Expression={$_.os}}, ` + @{Name='AgentVersion';Expression={$_.AgentVersion}}, ` + @{Name='AgentIP';Expression={$_.localIp}}, ` + @{Name='protectedVolumesCount';Expression={$_.protectedVolumesCount}}, ` + @{Name='unprotectedVolumesCount';Expression={$_.unprotectedVolumesCount}}, ` + @{Name='protectedVolumeNames';Expression={$_.protectedVolumeNames}}, ` + @{Name='unprotectedVolumeNames';Expression={$_.unprotectedVolumeNames}}, ` + @{Name='localSnapshots';Expression={$_.localSnapshots}}, ` + @{Name='latestOffsite';Expression={ (([System.DateTimeOffset]::FromUnixTimeSeconds($_.latestOffsite)).DateTime).ToString('yyyy-MM-dd-HHmm') }}, ` + @{Name='lastSnapshot';Expression={ (([System.DateTimeOffset]::FromUnixTimeSeconds($_.lastSnapshot)).DateTime).ToString('yyyy-MM-dd-HHmm') }}, ` + @{Name='lastScreenshotAttempt';Expression={ (([System.DateTimeOffset]::FromUnixTimeSeconds($_.lastScreenshotAttempt)).DateTime).ToString('yyyy-MM-dd-HHmm') }}, ` + @{Name='lastScreenshotAttemptStatus';Expression={$_.lastScreenshotAttemptStatus}}, ` + @{Name='isPaused';Expression={$_.isPaused}}, ` + @{Name='isArchived';Expression={$_.isArchived}}, ` + @{Name='volume';Expression={$_.volume}}, ` + @{Name='lastScreenshotUrl';Expression={$_.lastScreenshotUrl}}, ` + @{Name='backups';Expression={$_.backups}} + + } + } + } + Catch{ + Write-Host $_.Exception.Message -ForegroundColor Red -BackgroundColor Black + '' + Write-Error $_ + break + } + +#EndRegion [ Poke API ] + +#Region [ CSV Report ] + Try{ + If($Report -eq 'All' -or $Report -eq 'CSV'){ + Write-Output " - (2/3) - $(Get-Date -Format MM-dd-HH:mm) - Generating CSV" + $PokeAgentResults | Sort-Object clientCompanyName | Select-Object $ScriptName,* | Export-Csv $CSVReport -NoTypeInformation + } + } + Catch{ + Write-Host $_.Exception.Message -ForegroundColor Red -BackgroundColor Black + '' + Write-Error $_ + break + } + +#EndRegion [ CSV Report ] + +#Region [ HTML Report] + + Try{ + If ($Report -eq 'All' -or $Report -eq 'HTML'){ + Write-Output " - (3/3) - $(Get-Date -Format MM-dd-HH:mm) - Generating HTML" + + #HTML card header data to highlight useful information + $TotalAgents = ($PokeBCDR.agentCount | Measure-Object -Sum).sum + $AgentVersion = ($PokeAgentResults.AgentVersion | Select-Object -Unique).Count + $TotalProtectedVolumes = ($PokeAgentResults.protectedVolumesCount | Measure-Object -Sum).sum + $TotalUnProtectedVolumes = ($PokeAgentResults.unprotectedVolumesCount | Measure-Object -Sum).sum + $TotalPaused = ($PokeAgentResults | Where-Object {$_.isPaused -eq 'True'}).count + $TotalArchived = ($PokeAgentResults | Where-Object {$_.isArchived -eq 'True'}).count + + #Region [ HTML Report Building Blocks ] + + # Build the HTML header + # This grabs the raw text from files to shorten the amount of lines in the PSScript + # General idea is that the HTML assets would infrequently be changed once set + $Meta = Get-Content -Path "$PSScriptRoot\Assets\Meta.html" -Raw + $Meta = $Meta -replace 'xTITLECHANGEx',"$ScriptName" + $CSS = Get-Content -Path "$PSScriptRoot\Assets\Styles.css" -Raw + $JavaScript = Get-Content -Path "$PSScriptRoot\Assets\JavaScriptHeader.html" -Raw + $Head = $Meta + ("") + $JavaScript + + # HTML Body Building Blocks (In order) + $TopNav = Get-Content -Path "$PSScriptRoot\Assets\TopBar.html" -Raw + $DivMainStart = '
' + $SideBar = Get-Content -Path "$PSScriptRoot\Assets\SideBar.html" -Raw + $SideBar = $SideBar -replace ('xTIMESETx',"$HTMLDate") + $DivSecondStart = '
' + $PreLoader = Get-Content -Path "$PSScriptRoot\Assets\PreLoader.html" -Raw + $MainStart = '
' + + #Base Table Container + $BaseTableContainer = Get-Content -Path "$PSScriptRoot\Assets\TableContainer.html" -Raw + + #Summary Header + $SummaryTableContainer = $BaseTableContainer + $SummaryTableContainer = $SummaryTableContainer -replace ('xHEADERx',"$ScriptName - Summary") + $SummaryTableContainer = $SummaryTableContainer -replace ('xBreadCrumbx','') + + #Summary Cards + #HTML in Summary.html would be edited depending on the report and summary info you want to show + $SummaryCards = Get-Content -Path "$PSScriptRoot\Assets\Summary.html" -Raw + $SummaryCards = $SummaryCards -replace ('xCARD1Valuex',$TotalAgents) + $SummaryCards = $SummaryCards -replace ('xCARD2Valuex',$AgentVersion) + $SummaryCards = $SummaryCards -replace ('xCARD3Valuex',$TotalProtectedVolumes) + $SummaryCards = $SummaryCards -replace ('xCARD4Valuex',$TotalUnProtectedVolumes) + $SummaryCards = $SummaryCards -replace ('xCARD5Valuex',$TotalPaused) + $SummaryCards = $SummaryCards -replace ('xCARD6Valuex',$TotalArchived) + + #Body table headers, would be duplicated\adjusted depending on how many tables you want to show + $BodyTableContainer = $BaseTableContainer + $BodyTableContainer = $BodyTableContainer -replace ('xHEADERx',"$ScriptName - Details") + $BodyTableContainer = $BodyTableContainer -replace ('xBreadCrumbx',"Data gathered from $(hostname)") + + #Ending HTML + $DivEnd = '
' + $MainEnd = '' + $JavaScriptEnd = Get-Content -Path "$PSScriptRoot\Assets\JavaScriptEnd.html" -Raw + + #EndRegion [ HTML Report Building Blocks ] + #Region [ Example HTML Report Data\Structure ] + + #Creates an HTML table from PowerShell function results without any extra HTML tags + $TableResults = $PokeAgentResults | ConvertTo-Html -As Table -Fragment -Property clientCompanyName,Agent,AgentVersion,protectedVolumeNames,unprotectedVolumeNames,isPaused,isArchived ` + -PostContent '
    +
  • Note: SAMPLE 1 = Only applies to stuff and things
  • +
  • Note: SAMPLE 2 = Only applies to stuff and things
  • +
  • Note: SAMPLE 3 = Only applies to stuff and things
  • +
+ ' + + #Table section segregation + #PS doesn't create a tag so I have find the first row and make it so + $TableHeader = $TableResults -split "`r`n" | Where-Object {$_ -match ''} + #Unsure why PS makes empty as it contains no data + $TableColumnGroup = $TableResults -split "`r`n" | Where-Object {$_ -match ''} + + #Table ModIfications + #Replacing empty html table tags with simple replaceable names + #It was annoying me that empty rows showed in the raw HTML and I couldn't delete them as they were not $NUll but were empty + $TableResults = $TableResults -replace ($TableHeader,'xblanklinex') + $TableResults = $TableResults -replace ($TableColumnGroup,'xblanklinex') + $TableResults = $TableResults | Where-Object {$_ -ne 'xblanklinex'} | ForEach-Object {$_.Replace('xblanklinex','')} + + #Inject modified data back into the table + #Makes the table have a tag + $TableResults = $TableResults -replace '',"
`n$TableHeader" + $TableResults = $TableResults -replace '
','
' + + #Mark Focus Data to draw attention\talking points + #Need to understand RegEx more as this doesn't scale at all + $TableResults = $TableResults -replace '','' + + + #Building the final HTML report using the various ordered HTML building blocks from above. + #This is injecting html\css\javascript in a certain order into a file to make an HTML report + $HTML = ConvertTo-HTML -Head $Head -Body " $TopNav $DivMainStart $SideBar $DivSecondStart $PreLoader $MainStart + $SummaryTableContainer $SummaryCards $DivEnd $DivEnd $DivEnd + $BodyTableContainer $TableResults $DivEnd $DivEnd $DivEnd + $MainEnd $DivEnd $DivEnd $JavaScriptEnd + " + $HTML = $HTML -replace '','' + $HTML | Out-File $HTMLReport -Encoding utf8 + + } +} +Catch{ + Write-Host $_.Exception.Message -ForegroundColor Red -BackgroundColor Black + '' + Write-Error $_ + break +} +#EndRegion [ HTML Report ] + + If ($ShowReport){ + Invoke-Item $Log + } + +'' +Write-Output "END - $(Get-Date -Format yyyy-MM-dd-HH:mm)" +'' \ No newline at end of file diff --git a/examples/Get-PokeDeviceReport/Assets/JavaScriptEnd.html b/examples/Get-PokeDeviceReport/Assets/JavaScriptEnd.html new file mode 100644 index 0000000..303bcc7 --- /dev/null +++ b/examples/Get-PokeDeviceReport/Assets/JavaScriptEnd.html @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/examples/Get-PokeDeviceReport/Assets/JavaScriptHeader.html b/examples/Get-PokeDeviceReport/Assets/JavaScriptHeader.html new file mode 100644 index 0000000..130810f --- /dev/null +++ b/examples/Get-PokeDeviceReport/Assets/JavaScriptHeader.html @@ -0,0 +1,19 @@ + diff --git a/examples/Get-PokeDeviceReport/Assets/Meta.html b/examples/Get-PokeDeviceReport/Assets/Meta.html new file mode 100644 index 0000000..28966cc --- /dev/null +++ b/examples/Get-PokeDeviceReport/Assets/Meta.html @@ -0,0 +1,45 @@ + + + + + + + + + + + xTITLECHANGEx + + + + + + + + + + + \ No newline at end of file diff --git a/examples/Get-PokeDeviceReport/Assets/PreLoader.html b/examples/Get-PokeDeviceReport/Assets/PreLoader.html new file mode 100644 index 0000000..7e18876 --- /dev/null +++ b/examples/Get-PokeDeviceReport/Assets/PreLoader.html @@ -0,0 +1,5 @@ +
+
+
+
+
\ No newline at end of file diff --git a/examples/Get-PokeDeviceReport/Assets/SideBar.html b/examples/Get-PokeDeviceReport/Assets/SideBar.html new file mode 100644 index 0000000..98e0c62 --- /dev/null +++ b/examples/Get-PokeDeviceReport/Assets/SideBar.html @@ -0,0 +1,38 @@ +
+ +
\ No newline at end of file diff --git a/examples/Get-PokeDeviceReport/Assets/Summary.html b/examples/Get-PokeDeviceReport/Assets/Summary.html new file mode 100644 index 0000000..4e5648d --- /dev/null +++ b/examples/Get-PokeDeviceReport/Assets/Summary.html @@ -0,0 +1,179 @@ +
+ + + + +
+
+
+
+
+
+ Total BCDR's
+
xCARD1Valuex
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+
+ Device Types +
+
xCARD2Valuex
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+
+ Local Protected Storage
+
xCARD3Valuex
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+
+ Offsite Protected Storage
+
xCARD4Valuex
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+
+ Active Tickets
+
xCARD5Valuex
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+
+ Total Agents
+
xCARD6Valuex
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+
+ Total Shares
+
xCARD7Valuex
+
+
+ +
+
+
+
+
+ + +
+
+
+
+
+
+ Total Alerts
+
xCARD8Valuex
+
+
+ +
+
+
+
+
+ +
\ No newline at end of file diff --git a/examples/Get-PokeDeviceReport/Assets/TableContainer.html b/examples/Get-PokeDeviceReport/Assets/TableContainer.html new file mode 100644 index 0000000..9076949 --- /dev/null +++ b/examples/Get-PokeDeviceReport/Assets/TableContainer.html @@ -0,0 +1,7 @@ +
+

xHEADERx

+ +
+
\ No newline at end of file diff --git a/examples/Get-PokeDeviceReport/Assets/TopBar.html b/examples/Get-PokeDeviceReport/Assets/TopBar.html new file mode 100644 index 0000000..4148d70 --- /dev/null +++ b/examples/Get-PokeDeviceReport/Assets/TopBar.html @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/examples/Get-PokeDeviceReport/Assets/styles.css b/examples/Get-PokeDeviceReport/Assets/styles.css new file mode 100644 index 0000000..d309b5a --- /dev/null +++ b/examples/Get-PokeDeviceReport/Assets/styles.css @@ -0,0 +1,2102 @@ +@charset "UTF-8"; +/*!*Start Bootstrap - SB Admin v7.0.3 (https://startbootstrap.com/template/sb-admin)*/ +:root { + --bs-blue: #0d6efd; + --bs-white: #fff; + --bs-gray: #6c757d; + --bs-gray-dark: #343a40; + --bs-gray-100: #f8f9fa; + --bs-gray-200: #e9ecef; + --bs-gray-300: #dee2e6; + --bs-gray-400: #ced4da; + --bs-gray-500: #adb5bd; + --bs-gray-600: #6c757d; + --bs-gray-700: #495057; + --bs-gray-800: #343a40; + --bs-gray-900: #212529; + --bs-primary: #0d6efd; + --bs-secondary: #6c757d; + --bs-success: #198754; + --bs-info: #0dcaf0; + --bs-warning: #ffc107; + --bs-danger: #dc3545; + --bs-light: #f8f9fa; + --bs-dark: #212529; + --bs-primary-rgb: 13, 110, 253; + --bs-secondary-rgb: 108, 117, 125; + --bs-success-rgb: 25, 135, 84; + --bs-info-rgb: 13, 202, 240; + --bs-warning-rgb: 255, 193, 7; + --bs-danger-rgb: 220, 53, 69; + --bs-light-rgb: 248, 249, 250; + --bs-dark-rgb: 33, 37, 41; + --bs-white-rgb: 255, 255, 255; + --bs-black-rgb: 0, 0, 0; + --bs-body-rgb: 33, 37, 41; + --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto,"Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif,"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; + --bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas,"Liberation Mono", "Courier New", monospace; + --bs-gradient: linear-gradient(180deg,rgba(255, 255, 255, 0.15),rgba(255, 255, 255, 0)); + --bs-body-font-family: var(--bs-font-sans-serif); + --bs-body-font-size: 1rem; + --bs-body-font-weight: 400; + --bs-body-line-height: 1.5; + --bs-body-color: #212529; + --bs-body-bg: #fff; +} +*,::after,::before { + box-sizing: border-box; +} +@media (prefers-reduced-motion: no-preference) { + :root { + scroll-behavior: smooth; + } +} +/* custom scrollbar (Chrome & Edge) */ +::-webkit-scrollbar { + width: 10px; + height: 10px; +} +::-webkit-scrollbar-thumb { + background: rgba(100, 100, 100); +} +::-webkit-scrollbar-track { + background: rgba(0, 0, 0, 0.050); +} +body { + margin: 0; + font-family: var(--bs-body-font-family); + font-size: var(--bs-body-font-size); + font-weight: var(--bs-body-font-weight); + line-height: var(--bs-body-line-height); + color: var(--bs-body-color); + text-align: var(--bs-body-text-align); + background-color: var(--bs-body-bg); + -webkit-text-size-adjust: 100%; + -webkit-tap-highlight-color: transparent; +} +.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6 { + margin-top: 0; + margin-bottom: 0.5rem; + font-weight: 500; + line-height: 1.2; +} +.h1,h1 { + font-size: calc(1.375rem + 1.5vw); +} +@media (min-width: 1200px) { + .h1,h1 { + font-size: 2.5rem; + } +} +.h2,h2 { + font-size: calc(1.325rem + 0.9vw); +} +@media (min-width: 1200px) { + .h2,h2 { + font-size: 2rem; + } +} +.h3,h3 { + font-size: calc(1.3rem + 0.6vw); +} +@media (min-width: 1200px) { + .h3,h3 { + font-size: 1.75rem; + } +} +.h4,h4 { + font-size: calc(1.275rem + 0.3vw); +} +@media (min-width: 1200px) { + .h4,h4 { + font-size: 1.5rem; + } +} +.h5,h5 { + font-size: 1.25rem; +} +.h6,h6 { + font-size: 1rem; +} +p { + margin-top: 0; + margin-bottom: 1rem; +} +ol,ul { + padding-left: 2rem; +} +dl,ol,ul { + margin-top: 0; + margin-bottom: 1rem; +} +.small,small { + font-size: 0.875em; +} +img,svg { + vertical-align: middle; +} +table { + caption-side: bottom; + border-collapse: collapse; +} +th { + text-align: inherit; + text-align: -webkit-match-parent; +} +tbody,td,tfoot,th,thead,tr { + border-color: inherit; + border-style: solid; + border-width: 0; +} +.GoodStatus { + --bs-bg-opacity: 1; + /*background-color: rgba(var(--bs-success-rgb), var(--bs-bg-opacity)) !important; + */ + background-color: #1cc88a !important; + --bs-text-opacity: 1; + color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important; +} +.InfoStatus { + --bs-bg-opacity: 1; + /*background-color: rgba(var(--bs-primary-rgb), var(--bs-bg-opacity)) !important; + */ + background-color: #36b9cc !important; + --bs-text-opacity: 1; + color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important; +} +.WarningStatus { + --bs-bg-opacity: 1; + /*background-color: rgba(var(--bs-warning-rgb), var(--bs-bg-opacity)) !important; + */ + background-color: #f6c23e !important; + --bs-text-opacity: 1; + color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important; +} +.BadStatus { + --bs-bg-opacity: 1; + /*background-color: rgba(var(--bs-danger-rgb), var(--bs-bg-opacity)) !important; + */ + background-color: #e74a3b !important; + --bs-text-opacity: 1; + color: rgba(var(--bs-white-rgb), var(--bs-text-opacity)) !important; +} +/*Row from SB-Admin2*/ +.row { + display: flex; + flex-wrap: wrap; + margin-right: -0.75rem; + margin-left: -0.75rem; +} +.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, .col-7, .col-8, .col-9, .col-10, .col-11, .col-12, .col,.col-auto, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm,.col-sm-auto, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12, .col-md,.col-md-auto, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg,.col-lg-auto, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12, .col-xl,.col-xl-auto { + position: relative; + width: 100%; + padding-right: 0.75rem; + padding-left: 0.75rem; +} +.col-auto { + flex: 0 0 auto; + width: auto; + max-width: 100%; +} +@media (min-width: 1200px) { + .col-xl { + flex-basis: 0; + flex-grow: 1; + max-width: 100%; + } + .row-cols-xl-1 > * { + flex: 0 0 100%; + max-width: 100%; + } + .row-cols-xl-2 > * { + flex: 0 0 50%; + max-width: 50%; + } + .row-cols-xl-3 > * { + flex: 0 0 33.33333%; + max-width: 33.33333%; + } + .row-cols-xl-4 > * { + flex: 0 0 25%; + max-width: 25%; + } + .row-cols-xl-5 > * { + flex: 0 0 20%; + max-width: 20%; + } + .row-cols-xl-6 > * { + flex: 0 0 16.66667%; + max-width: 16.66667%; + } + .col-xl-auto { + flex: 0 0 auto; + width: auto; + max-width: 100%; + } + .col-xl-1 { + flex: 0 0 8.33333%; + max-width: 8.33333%; + } + .col-xl-2 { + flex: 0 0 16.66667%; + max-width: 16.66667%; + } + .col-xl-20 { + flex: 0 0 20%; + max-width: 20%; + } + .col-xl-3 { + flex: 0 0 25%; + max-width: 25%; + } + .col-xl-4 { + flex: 0 0 33.33333%; + max-width: 33.33333%; + } + .col-xl-5 { + flex: 0 0 41.66667%; + max-width: 41.66667%; + } + .col-xl-6 { + flex: 0 0 50%; + max-width: 50%; + } + .col-xl-7 { + flex: 0 0 58.33333%; + max-width: 58.33333%; + } + .col-xl-8 { + flex: 0 0 66.66667%; + max-width: 66.66667%; + } + .col-xl-9 { + flex: 0 0 75%; + max-width: 75%; + } + .col-xl-10 { + flex: 0 0 83.33333%; + max-width: 83.33333%; + } + .col-xl-11 { + flex: 0 0 91.66667%; + max-width: 91.66667%; + } + .col-xl-12 { + flex: 0 0 100%; + max-width: 100%; + } + .order-xl-first { + order: -1; + } + .order-xl-last { + order: 13; + } + .order-xl-0 { + order: 0; + } + .order-xl-1 { + order: 1; + } + .order-xl-2 { + order: 2; + } + .order-xl-3 { + order: 3; + } + .order-xl-4 { + order: 4; + } + .order-xl-5 { + order: 5; + } + .order-xl-6 { + order: 6; + } + .order-xl-7 { + order: 7; + } + .order-xl-8 { + order: 8; + } + .order-xl-9 { + order: 9; + } + .order-xl-10 { + order: 10; + } + .order-xl-11 { + order: 11; + } + .order-xl-12 { + order: 12; + } + .offset-xl-0 { + margin-left: 0; + } + .offset-xl-1 { + margin-left: 8.33333%; + } + .offset-xl-2 { + margin-left: 16.66667%; + } + .offset-xl-3 { + margin-left: 25%; + } + .offset-xl-4 { + margin-left: 33.33333%; + } + .offset-xl-5 { + margin-left: 41.66667%; + } + .offset-xl-6 { + margin-left: 50%; + } + .offset-xl-7 { + margin-left: 58.33333%; + } + .offset-xl-8 { + margin-left: 66.66667%; + } + .offset-xl-9 { + margin-left: 75%; + } + .offset-xl-10 { + margin-left: 83.33333%; + } + .offset-xl-11 { + margin-left: 91.66667%; + } +} +@media (min-width: 768px) { + .col-md { + flex-basis: 0; + flex-grow: 1; + max-width: 100%; + } + .row-cols-md-1 > * { + flex: 0 0 100%; + max-width: 100%; + } + .row-cols-md-2 > * { + flex: 0 0 50%; + max-width: 50%; + } + .row-cols-md-3 > * { + flex: 0 0 33.33333%; + max-width: 33.33333%; + } + .row-cols-md-4 > * { + flex: 0 0 25%; + max-width: 25%; + } + .row-cols-md-5 > * { + flex: 0 0 20%; + max-width: 20%; + } + .row-cols-md-6 > * { + flex: 0 0 16.66667%; + max-width: 16.66667%; + } + .col-md-auto { + flex: 0 0 auto; + width: auto; + max-width: 100%; + } + .col-md-1 { + flex: 0 0 8.33333%; + max-width: 8.33333%; + } + .col-md-2 { + flex: 0 0 16.66667%; + max-width: 16.66667%; + } + .col-md-3 { + flex: 0 0 25%; + max-width: 25%; + } + .col-md-4 { + flex: 0 0 33.33333%; + max-width: 33.33333%; + } + .col-md-5 { + flex: 0 0 41.66667%; + max-width: 41.66667%; + } + .col-md-6 { + flex: 0 0 50%; + /*max-width: 50%; + */ + } + .col-md-7 { + flex: 0 0 58.33333%; + max-width: 58.33333%; + } + .col-md-8 { + flex: 0 0 66.66667%; + max-width: 66.66667%; + } + .col-md-9 { + flex: 0 0 75%; + max-width: 75%; + } + .col-md-10 { + flex: 0 0 83.33333%; + max-width: 83.33333%; + } + .col-md-11 { + flex: 0 0 91.66667%; + max-width: 91.66667%; + } + .col-md-12 { + flex: 0 0 100%; + max-width: 100%; + } + .order-md-first { + order: -1; + } + .order-md-last { + order: 13; + } + .order-md-0 { + order: 0; + } + .order-md-1 { + order: 1; + } + .order-md-2 { + order: 2; + } + .order-md-3 { + order: 3; + } + .order-md-4 { + order: 4; + } + .order-md-5 { + order: 5; + } + .order-md-6 { + order: 6; + } + .order-md-7 { + order: 7; + } + .order-md-8 { + order: 8; + } + .order-md-9 { + order: 9; + } + .order-md-10 { + order: 10; + } + .order-md-11 { + order: 11; + } + .order-md-12 { + order: 12; + } + .offset-md-0 { + margin-left: 0; + } + .offset-md-1 { + margin-left: 8.33333%; + } + .offset-md-2 { + margin-left: 16.66667%; + } + .offset-md-3 { + margin-left: 25%; + } + .offset-md-4 { + margin-left: 33.33333%; + } + .offset-md-5 { + margin-left: 41.66667%; + } + .offset-md-6 { + margin-left: 50%; + } + .offset-md-7 { + margin-left: 58.33333%; + } + .offset-md-8 { + margin-left: 66.66667%; + } + .offset-md-9 { + margin-left: 75%; + } + .offset-md-10 { + margin-left: 83.33333%; + } + .offset-md-11 { + margin-left: 91.66667%; + } +} +.mb-4,.my-4 { + margin-bottom: 1.5rem !important; +} +.border-left-primary { + border-left: 0.25rem solid #4e73df !important; +} +.border-left-secondary { + border-left: 0.25rem solid #858796 !important; +} +.border-left-success { + border-left: 0.25rem solid #1cc88a !important; +} +.border-left-info { + border-left: 0.25rem solid #36b9cc !important; +} +.border-left-warning { + border-left: 0.25rem solid #f6c23e !important; +} +.border-left-danger { + border-left: 0.25rem solid #e74a3b !important; +} +.border-bottom-light { + border-bottom: 0.25rem solid #f8f9fc !important; +} +.border-left-dark { + border-left: 0.25rem solid #5a5c69 !important; +} +.shadow-sm { + box-shadow: 0 0.125rem 0.25rem 0 rgba(58, 59, 69, 0.2) !important; +} +.shadow { + box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important; +} +.shadow-lg { + box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important; +} +.shadow-none { + box-shadow: none !important; +} +progress { + vertical-align: baseline; +} +.progress-sm { + height: .5rem; +} +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 1rem 0; + } + to { + background-position: 0 0; + } +} +@keyframes progress-bar-stripes { + from { + background-position: 1rem 0; + } + to { + background-position: 0 0; + } +} +.progress { + display: flex; + height: 1rem; + overflow: hidden; + line-height: 0; + font-size: 0.75rem; + background-color: #eaecf4; + border-radius: 0.35rem; + height: 7px; +} +.progress-bar { + display: flex; + flex-direction: column; + justify-content: center; + overflow: hidden; + color: #fff; + text-align: center; + white-space: nowrap; + background-color: #4e73df; + transition: width 0.6s ease; +} +@media (prefers-reduced-motion: reduce) { + .progress-bar { + transition: none; + } +} +.progress-bar-striped { + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-size: 1rem 1rem; +} +.progress-bar-animated { + -webkit-animation: 1s linear infinite progress-bar-stripes; + animation: 1s linear infinite progress-bar-stripes; +} +@media (prefers-reduced-motion: reduce) { + .progress-bar-animated { + -webkit-animation: none; + animation: none; + } +} +.bg-info { + background-color: #36b9cc !important; +} +a.bg-info:hover, a.bg-info:focus,button.bg-info:hover,button.bg-info:focus { + background-color: #2a96a5 !important; +} +.h-100 { + height: 100% !important; +} +.pt-2,.py-2 { + padding-top: 0.5rem !important; +} +.pb-2,.py-2 { + padding-bottom: 0.5rem !important; +} +.mb-1,.my-1 { + margin-bottom: 0.25rem !important; +} +.mr-2,.mx-2 { + margin-right: 0.5rem !important; +} +.mb-0,.my-0 { + margin-bottom: 0 !important; +} +.mr-3,.mx-3 { + margin-right: 1rem !important; +} +.text-gray-800 { + color: #5a5c69 !important; +} +.text-gray-300 { + color: #dddfeb !important; +} +.text-xs { + font-size: .7rem; +} +.text-primary { + color: #4e73df !important; +} +a.text-primary:hover, a.text-primary:focus { + color: #224abe !important; +} +.text-uppercase, .dropdown .dropdown-menu .dropdown-header, .sidebar .sidebar-heading { + text-transform: uppercase !important; +} +.font-weight-bold { + font-weight: 700 !important; +} +.no-gutters { + margin-right: 0; + margin-left: 0; +} +.no-gutters > .col,.no-gutters > [class*="col-"] { + padding-right: 0; + padding-left: 0; +} +.col { + flex-basis: 0; + flex-grow: 1; + max-width: 100%; +} +.align-items-center { + align-items: center !important; +} +.mr-2,.mx-2 { + margin-right: 0.5rem !important; +} +label { + display: inline-block; +} +button { + border-radius: 0; +} +button:focus:not(:focus-visible) { + outline: 0; +} +button,input,optgroup,select,textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} +button,select { + text-transform: none; +} +select { + word-wrap: normal; +} +[type="button"],[type="reset"],[type="submit"],button { + -webkit-appearance: button; +} +[type="button"]:not(:disabled),[type="reset"]:not(:disabled),[type="submit"]:not(:disabled),button:not(:disabled) { + cursor: pointer; +} +::-moz-focus-inner { + padding: 0; + border-style: none; +} +.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl { + width: 100%; + padding-right: var(--bs-gutter-x, 0.75rem); + padding-left: var(--bs-gutter-x, 0.75rem); + margin-right: auto; + margin-left: auto; +} +@media (min-width: 576px) { + .container,.container-sm { + max-width: 540px; + } +} +@media (min-width: 768px) { + .container,.container-md,.container-sm { + max-width: 720px; + } +} +@media (min-width: 992px) { + .container,.container-lg,.container-md,.container-sm { + max-width: 960px; + } +} +@media (min-width: 1200px) { + .container,.container-lg,.container-md,.container-sm,.container-xl { + max-width: 1140px; + } +} +@media (min-width: 1400px) { + .container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl { + max-width: 1320px; + } +} +.dataTable-table,.table { + --bs-table-bg: transparent; + --bs-table-accent-bg: transparent; + --bs-table-striped-color: #212529; + --bs-table-striped-bg: rgba(0, 0, 0, 0.05); + --bs-table-active-color: #212529; + --bs-table-active-bg: rgba(0, 0, 0, 0.1); + --bs-table-hover-color: #212529; + --bs-table-hover-bg: #d8cba0; + width: 100%; + margin-bottom: 1rem; + color: #212529; + vertical-align: top; + border-color: #dee2e6; +} +.dataTable-table > :not(caption) > * > *,.table > :not(caption) > * > * { + padding: 0.5rem 0.5rem; + background-color: var(--bs-table-bg); + border-bottom-width: 1px; + box-shadow: inset 0 0 0 9999px var(--bs-table-accent-bg); +} +.dataTable-table > tbody,.table > tbody { + vertical-align: inherit; +} +.dataTable-table > thead,.table > thead { + vertical-align: bottom; +} +.dataTable-table > :not(:last-child) > :last-child > *,.table > :not(:last-child) > :last-child > * { + border-bottom-color: currentColor; +} +.caption-top { + caption-side: top; +} +.table-sm > :not(caption) > * > * { + padding: 0.25rem 0.25rem; +} +.dataTable-table > :not(caption) > *,.table-bordered > :not(caption) > * { + border-width: 1px 0; +} +.table-borderless > :not(caption) > * > * { + border-bottom-width: 0; +} +.table-striped > tbody > tr:nth-of-type(odd) { + --bs-table-accent-bg: var(--bs-table-striped-bg); + color: var(--bs-table-striped-color); +} +.table-active { + --bs-table-accent-bg: var(--bs-table-active-bg); + color: var(--bs-table-active-color); +} +.dataTable-table > tbody > tr:hover,.table-hover > tbody > tr:hover { + --bs-table-accent-bg: var(--bs-table-hover-bg); + color: var(--bs-table-hover-color); +} +.dataTable-wrapper .dataTable-container,.table-responsive { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + width: 100% !important; +} +@media (max-width: 575.98px) { + .table-responsive-sm { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 767.98px) { + .table-responsive-md { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 991.98px) { + .table-responsive-lg { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 1199.98px) { + .table-responsive-xl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +@media (max-width: 1399.98px) { + .table-responsive-xxl { + overflow-x: auto; + -webkit-overflow-scrolling: touch; + } +} +.dataTable-input,.form-control { + display: block; + width: 100%; + padding: 0.375rem 0.75rem; + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-clip: padding-box; + border: 1px solid #ced4da; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + border-radius: 0.25rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .dataTable-input,.form-control { + transition: none; + } +} +.form-control[type="file"],[type="file"].dataTable-input { + overflow: hidden; +} +.form-control[type="file"]:not(:disabled):not([readonly]),[type="file"].dataTable-input:not(:disabled):not([readonly]) { + cursor: pointer; +} +.dataTable-input:focus,.form-control:focus { + color: #212529; + background-color: #fff; + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.dataTable-input::-webkit-date-and-time-value,.form-control::-webkit-date-and-time-value { + height: 1.5em; +} +.dataTable-input::-moz-placeholder,.form-control::-moz-placeholder { + color: #6c757d; + opacity: 1; +} +.dataTable-input:-ms-input-placeholder,.form-control:-ms-input-placeholder { + color: #6c757d; + opacity: 1; +} +.dataTable-input::placeholder,.form-control::placeholder { + color: #6c757d; + opacity: 1; +} +.dataTable-selector,.form-select { + display: block; + width: 100%; + padding: 0.375rem 2.25rem 0.375rem 0.75rem; + -moz-padding-start: calc(0.75rem - 3px); + font-size: 1rem; + font-weight: 400; + line-height: 1.5; + color: #212529; + background-color: #fff; + background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e"); + background-repeat: no-repeat; + background-position: right 0.75rem center; + background-size: 16px 12px; + border: 1px solid #ced4da; + border-radius: 0.25rem; + transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} +@media (prefers-reduced-motion: reduce) { + .dataTable-selector,.form-select { + transition: none; + } +} +.dataTable-selector:focus,.form-select:focus { + border-color: #86b7fe; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.btn { + display: inline-block; + font-weight: 400; + line-height: 1.5; + color: #212529; + text-align: center; + text-decoration: none; + vertical-align: middle; + cursor: pointer; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + background-color: transparent; + border: 1px solid transparent; + padding: 0.375rem 0.75rem; + font-size: 1rem; + border-radius: 0.25rem; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .btn { + transition: none; + } +} +.btn:hover { + color: #212529; +} +.btn-check:focus + .btn,.btn:focus { + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.btn-link { + font-weight: 400; + color: #0d6efd; + text-decoration: underline; +} +.btn-link:hover { + color: #0a58ca; +} +.btn-group-sm > .btn,.btn-sm { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; + border-radius: 0.2rem; +} +.nav { + display: flex; + flex-wrap: wrap; + padding-left: 0; + margin-bottom: 0; + list-style: none; +} +.nav-link { + display: block; + padding: 0.5rem 1rem; + color: #0d6efd; + text-decoration: none; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,border-color 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .nav-link { + transition: none; + } +} +.nav-link:focus,.nav-link:hover { + color: #0a58ca; +} +.navbar { + position: relative; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + padding-top: 0.5rem; + padding-bottom: 0.5rem; +} +.navbar-brand { + padding-top: 0.3125rem; + padding-bottom: 0.3125rem; + margin-right: 1rem; + font-size: 1.25rem; + text-decoration: none; + white-space: nowrap; +} +.navbar-expand { + flex-wrap: nowrap; + justify-content: flex-start; +} +.navbar-dark .navbar-brand { + color: #fff; +} +.card { + position: relative; + display: flex; + flex-direction: column; + min-width: 0; + word-wrap: break-word; + background-color: #fff; + background-clip: border-box; + border-radius: 0.25rem; +} +.card-body { + flex: 1 1 auto; + min-height: 1px; + padding: 1rem 1rem; +} +/*.card-body { + flex: 1 1 auto; + min-height: 1px; + padding: 1.25rem; +} +*/ +.breadcrumb { + display: flex; + flex-wrap: wrap; + padding: 0 0; + margin-bottom: 1rem; + list-style: none; +} +.breadcrumb-item + .breadcrumb-item { + padding-left: 0.5rem; +} +.breadcrumb-item + .breadcrumb-item::before { + float: left; + padding-right: 0.5rem; + color: #6c757d; + content: var(--bs-breadcrumb-divider, "/"); +} +.breadcrumb-item.active { + color: #6c757d; +} +.dataTable-pagination ul,.pagination { + display: flex; + padding-left: 0; + list-style: none; +} +.dataTable-pagination a,.page-link { + position: relative; + display: block; + color: #0d6efd; + text-decoration: none; + background-color: #fff; + border: 1px solid #dee2e6; + transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out,border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out; +} +@media (prefers-reduced-motion: reduce) { + .dataTable-pagination a,.page-link { + transition: none; + } +} +.dataTable-pagination a:hover,.page-link:hover { + z-index: 2; + color: #0a58ca; + background-color: #e9ecef; + border-color: #dee2e6; +} +.dataTable-pagination a:focus,.page-link:focus { + z-index: 3; + color: #0a58ca; + background-color: #e9ecef; + outline: 0; + box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25); +} +.dataTable-pagination .page-item:not(:first-child) a,.dataTable-pagination li:not(:first-child) .page-link,.dataTable-pagination li:not(:first-child) a,.page-item:not(:first-child) .dataTable-pagination a,.page-item:not(:first-child) .page-link { + margin-left: -1px; +} +.dataTable-pagination .page-item.active a,.dataTable-pagination li.active .page-link,.dataTable-pagination li.active a,.page-item.active .dataTable-pagination a,.page-item.active .page-link { + z-index: 3; + color: #fff; + background-color: #0d6efd; + border-color: #0d6efd; +} +.dataTable-pagination .page-item.disabled a,.dataTable-pagination li.disabled .page-link,.dataTable-pagination li.disabled a,.page-item.disabled .dataTable-pagination a,.page-item.disabled .page-link { + color: #6c757d; + pointer-events: none; + background-color: #fff; + border-color: #dee2e6; +} +.dataTable-pagination a,.page-link { + padding: 0.375rem 0.75rem; +} +.dataTable-pagination .page-item:first-child a,.dataTable-pagination li:first-child .page-link,.dataTable-pagination li:first-child a,.page-item:first-child .dataTable-pagination a,.page-item:first-child .page-link { + border-top-left-radius: 0.25rem; + border-bottom-left-radius: 0.25rem; +} +.dataTable-pagination .page-item:last-child a,.dataTable-pagination li:last-child .page-link,.dataTable-pagination li:last-child a,.page-item:last-child .dataTable-pagination a,.page-item:last-child .page-link { + border-top-right-radius: 0.25rem; + border-bottom-right-radius: 0.25rem; +} +.dataTable-pagination .pagination-lg a,.pagination-lg .dataTable-pagination a,.pagination-lg .page-link { + padding: 0.75rem 1.5rem; + font-size: 1.25rem; +} +.dataTable-pagination .pagination-lg .page-item:first-child a,.dataTable-pagination .pagination-lg li:first-child .page-link,.dataTable-pagination .pagination-lg li:first-child a,.pagination-lg .dataTable-pagination li:first-child .page-link,.pagination-lg .dataTable-pagination li:first-child a,.pagination-lg .page-item:first-child .dataTable-pagination a,.pagination-lg .page-item:first-child .page-link { + border-top-left-radius: 0.3rem; + border-bottom-left-radius: 0.3rem; +} +.dataTable-pagination .pagination-lg .page-item:last-child a,.dataTable-pagination .pagination-lg li:last-child .page-link,.dataTable-pagination .pagination-lg li:last-child a,.pagination-lg .dataTable-pagination li:last-child .page-link,.pagination-lg .dataTable-pagination li:last-child a,.pagination-lg .page-item:last-child .dataTable-pagination a,.pagination-lg .page-item:last-child .page-link { + border-top-right-radius: 0.3rem; + border-bottom-right-radius: 0.3rem; +} +.dataTable-pagination .pagination-sm a,.pagination-sm .dataTable-pagination a,.pagination-sm .page-link { + padding: 0.25rem 0.5rem; + font-size: 0.875rem; +} +.dataTable-pagination .pagination-sm .page-item:first-child a,.dataTable-pagination .pagination-sm li:first-child .page-link,.dataTable-pagination .pagination-sm li:first-child a,.pagination-sm .dataTable-pagination li:first-child .page-link,.pagination-sm .dataTable-pagination li:first-child a,.pagination-sm .page-item:first-child .dataTable-pagination a,.pagination-sm .page-item:first-child .page-link { + border-top-left-radius: 0.2rem; + border-bottom-left-radius: 0.2rem; +} +.dataTable-pagination .pagination-sm .page-item:last-child a,.dataTable-pagination .pagination-sm li:last-child .page-link,.dataTable-pagination .pagination-sm li:last-child a,.pagination-sm .dataTable-pagination li:last-child .page-link,.pagination-sm .dataTable-pagination li:last-child a,.pagination-sm .page-item:last-child .dataTable-pagination a,.pagination-sm .page-item:last-child .page-link { + border-top-right-radius: 0.2rem; + border-bottom-right-radius: 0.2rem; +} +.fixed-top,.sb-nav-fixed #layoutSidenav #layoutSidenav_nav,.sb-nav-fixed .sb-topnav { + position: fixed; + top: 0; + right: 0; + left: 0; + z-index: 1030; +} +.fixed-bottom { + position: fixed; + right: 0; + bottom: 0; + left: 0; + z-index: 1030; +} +.sticky-top { + position: sticky; + top: 0; + z-index: 1020; +} +.order-first { + order: -1 !important; +} +.order-0 { + order: 0 !important; +} +.order-1 { + order: 1 !important; +} +.order-2 { + order: 2 !important; +} +.order-3 { + order: 3 !important; +} +.order-4 { + order: 4 !important; +} +.order-5 { + order: 5 !important; +} +.order-last { + order: 6 !important; +} +.mt-0 { + margin-top: 0 !important; +} +.mt-1 { + margin-top: 0.25rem !important; +} +.mt-2 { + margin-top: 0.5rem !important; +} +.mt-3 { + margin-top: 1rem !important; +} +.mt-4 { + margin-top: 1.5rem !important; +} +.mt-5 { + margin-top: 3rem !important; +} +.mt-auto { + margin-top: auto !important; +} +.me-0 { + margin-right: 0 !important; +} +.me-1 { + margin-right: 0.25rem !important; +} +.me-2 { + margin-right: 0.5rem !important; +} +.me-3 { + margin-right: 1rem !important; +} +.me-4 { + margin-right: 1.5rem !important; +} +.me-5 { + margin-right: 3rem !important; +} +.me-auto { + margin-right: auto !important; +} +.mb-0 { + margin-bottom: 0 !important; +} +.mb-1 { + margin-bottom: 0.25rem !important; +} +.mb-2 { + margin-bottom: 0.5rem !important; +} +.mb-3 { + margin-bottom: 1rem !important; +} +.mb-4 { + margin-bottom: 1.5rem !important; +} +.mb-5 { + margin-bottom: 3rem !important; +} +.mb-auto { + margin-bottom: auto !important; +} +.px-0 { + padding-right: 0 !important; + padding-left: 0 !important; +} +.px-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; +} +.px-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; +} +.px-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; +} +.px-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; +} +.px-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; +} +.ps-0 { + padding-left: 0 !important; +} +.ps-1 { + padding-left: 0.25rem !important; +} +.ps-2 { + padding-left: 0.5rem !important; +} +.ps-3 { + padding-left: 1rem !important; +} +.ps-4 { + padding-left: 1.5rem !important; +} +.ps-5 { + padding-left: 3rem !important; +} +.bg-dark { + --bs-bg-opacity: 1; + background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important; +} +body,html { + height: 100%; +} +#layoutSidenav { + display: flex; +} +#layoutSidenav #layoutSidenav_nav { + flex-basis: 225px; + flex-shrink: 0; + transition: transform 0.15s ease-in-out; + z-index: 1038; + transform: translateX(-225px); +} +#layoutSidenav #layoutSidenav_content { + position: relative; + display: flex; + flex-direction: column; + justify-content: space-between; + min-width: 0; + flex-grow: 1; + min-height: calc(100vh - 56px); + margin-left: -225px; +} +.sb-sidenav-toggled #layoutSidenav #layoutSidenav_nav { + transform: translateX(0); +} +.sb-sidenav-toggled #layoutSidenav #layoutSidenav_content:before { + content: ""; + display: block; + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: #000; + z-index: 1037; + opacity: 0.5; + transition: opacity 0.3s ease-in-out; +} +@media (min-width: 992px) { + #layoutSidenav #layoutSidenav_nav { + transform: translateX(0); + } + #layoutSidenav #layoutSidenav_content { + margin-left: 0; + transition: margin 0.15s ease-in-out; + } + .sb-sidenav-toggled #layoutSidenav #layoutSidenav_nav { + transform: translateX(-225px); + } + .sb-sidenav-toggled #layoutSidenav #layoutSidenav_content { + margin-left: -225px; + } + .sb-sidenav-toggled #layoutSidenav #layoutSidenav_content:before { + display: none; + } +} +.sb-nav-fixed .sb-topnav { + z-index: 1039; +} +.sb-nav-fixed #layoutSidenav #layoutSidenav_nav { + width: 225px; + height: 100vh; + z-index: 1038; +} +.sb-nav-fixed #layoutSidenav #layoutSidenav_nav .sb-sidenav { + padding-top: 56px; +} +.sb-nav-fixed #layoutSidenav #layoutSidenav_nav .sb-sidenav .sb-sidenav-menu { + overflow-y: auto; +} +.sb-nav-fixed #layoutSidenav #layoutSidenav_content { + padding-left: 225px; + top: 56px; +} +.nav .nav-link .sb-nav-link-icon,.sb-sidenav-menu .nav-link .sb-nav-link-icon { + margin-right: 0.5rem; +} +.sb-topnav { + padding-left: 0; + height: 56px; + z-index: 1039; +} +.sb-topnav .navbar-brand { + width: 225px; + margin: 0; +} +.sb-topnav.navbar-dark #sidebarToggle { + color: rgba(255, 255, 255, 0.5); +} +.sb-sidenav { + display: flex; + flex-direction: column; + height: 100%; + flex-wrap: nowrap; +} +.sb-sidenav .sb-sidenav-menu { + flex-grow: 1; +} +.sb-sidenav .sb-sidenav-menu .nav { + flex-direction: column; + flex-wrap: nowrap; +} +.sb-sidenav .sb-sidenav-menu .nav .sb-sidenav-menu-heading { + padding: 1.75rem 1rem 0.75rem; + font-size: 0.75rem; + font-weight: 700; + text-transform: uppercase; +} +.sb-sidenav .sb-sidenav-menu .nav .nav-link { + display: flex; + align-items: center; + padding-top: 0.75rem; + padding-bottom: 0.75rem; + position: relative; +} +.sb-sidenav .sb-sidenav-menu .nav .nav-link .sb-nav-link-icon { + font-size: 0.9rem; +} +.sb-sidenav .sb-sidenav-menu .nav .nav-link .sb-sidenav-collapse-arrow { + display: inline-block; + margin-left: auto; + transition: transform 0.15s ease; +} +.sb-sidenav.sb-sidenav-menu.nav.nav-link.collapsed.sb-sidenav-collapse-arrow { + transform: rotate(-90deg); +} +.sb-sidenav .sb-sidenav-menu .nav .sb-sidenav-menu-nested { + margin-left: 1.5rem; + flex-direction: column; +} +.sb-sidenav .sb-sidenav-footer { + padding: 0.75rem; + flex-shrink: 0; +} +.sb-sidenav-dark { + background-color: #212529; + color: rgba(255, 255, 255, 0.5); +} +.sb-sidenav-dark .sb-sidenav-menu .sb-sidenav-menu-heading { + color: rgba(255, 255, 255, 0.25); +} +.sb-sidenav-dark .sb-sidenav-menu .nav-link { + color: rgba(255, 255, 255, 0.5); +} +.sb-sidenav-dark .sb-sidenav-menu .nav-link .sb-nav-link-icon { + color: rgba(255, 255, 255, 0.25); +} +.sb-sidenav-dark .sb-sidenav-menu .nav-link .sb-sidenav-collapse-arrow { + color: rgba(255, 255, 255, 0.25); +} +.sb-sidenav-dark .sb-sidenav-menu .nav-link:hover { + color: #fff; +} +.sb-sidenav-dark .sb-sidenav-menu .nav-link.active { + color: #fff; +} +.sb-sidenav-dark .sb-sidenav-menu .nav-link.active .sb-nav-link-icon { + color: #fff; +} +.sb-sidenav-dark .sb-sidenav-footer { + background-color: #343a40; +} +.dataTable-wrapper .dataTable-container { + font-size: 0.875rem; +} +.dataTable-wrapper.no-header .dataTable-container { + border-top: none; +} +.dataTable-wrapper.no-footer .dataTable-container { + border-bottom: none; + border-top-left-radius: 15px; + border-top-right-radius: 15px; +} +.dataTable-top { + padding: 0 0 1rem; +} +.dataTable-bottom { + padding: 0; +} +.dataTable-bottom > div:first-child,.dataTable-bottom > nav:first-child,.dataTable-top > div:first-child,.dataTable-top > nav:first-child { + float: left; +} +.dataTable-bottom > div:last-child,.dataTable-bottom > nav:last-child,.dataTable-top > div:last-child,.dataTable-top > nav:last-child { + float: right; +} +.dataTable-selector { + width: auto; + display: inline-block; + padding-left: 1.125rem; + padding-right: 2.125rem; + margin-right: 0.25rem; +} +.dataTable-info { + margin: 7px 0; +} +.dataTable-pagination a:hover { + background-color: #e9ecef; +} +.dataTable-pagination .active a,.dataTable-pagination .active a:focus,.dataTable-pagination .active a:hover { + background-color: #0d6efd; +} +.dataTable-pagination .disabled a,.dataTable-pagination .disabled a:focus,.dataTable-pagination .disabled a:hover,.dataTable-pagination .ellipsis a { + cursor: not-allowed; +} +.dataTable-pagination .disabled a,.dataTable-pagination .disabled a:focus,.dataTable-pagination .disabled a:hover { + cursor: not-allowed; + opacity: 0.4; +} +.dataTable-pagination .pager a { + font-weight: 700; +} +.dataTable-table { + border-collapse: collapse; +} +.dataTable-table > tbody > tr > td,.dataTable-table > tbody > tr > th,.dataTable-table > tfoot > tr > td,.dataTable-table > tfoot > tr > th,.dataTable-table > thead > tr > td,.dataTable-table > thead > tr > th { + vertical-align: top; + padding: 0.5rem 0.5rem; +} +.dataTable-table > thead > tr > th { + vertical-align: bottom; + text-align: left; + border-bottom: none; +} +.dataTable-table thead tr { + background-color: rgb(35 115 212); + color: #fff; + text-align: left; +} +.dataTable-table tbody tr { + border-bottom: 1px solid #ddd; +} +.dataTable-table tbody tr:nth-of-type(even) { + background-color: #f3f3f3; +} +.dataTable-table tbody tr:last-of-type { + border-bottom: 5px solid rgb(35 115 212); +} +.dataTable-table > tfoot > tr > th { + vertical-align: bottom; + text-align: left; +} +.dataTable-table th { + vertical-align: bottom; + text-align: left; +} +.dataTable-table th a { + text-decoration: none; + color: inherit; +} +.dataTable-sorter { + display: inline-block; + height: 100%; + position: relative; + width: 100%; + padding-right: 1rem; +} +.dataTable-sorter::after,.dataTable-sorter::before { + content: ""; + height: 0; + width: 0; + position: absolute; + right: 4px; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + opacity: 0.2; +} +.dataTable-sorter::before { + bottom: 4px; +} +.dataTable-sorter::after { + top: 0; +} +.asc .dataTable-sorter::after,.desc .dataTable-sorter::before { + opacity: 0.6; +} +.dataTables-empty { + text-align: center; +} +.dataTable-bottom::after,.dataTable-top::after { + clear: both; + content: " "; + display: table; +} +.btn-datatable { + height: 20px !important; + width: 20px !important; + font-size: 0.75rem; + border-radius: 0.25rem !important; +} +/** Custom loader screen to add some flare to the report* https://ihatetomatoes.net/create-custom-preloading-screen/*/ +#loader-wrapper { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 1000; +} +#loader { + display: block; + position: relative; + left: 50%; + top: 50%; + width: 150px; + height: 150px; + margin: -75px 0 0 -75px; + border-radius: 50%; + border: 3px solid transparent; + border-top-color: #3498db; + -webkit-animation: spin 2s linear infinite; + animation: spin 2s linear infinite; + z-index: 1001; +} +#loader:before { + content: ""; + position: absolute; + top: 5px; + left: 5px; + right: 5px; + bottom: 5px; + border-radius: 50%; + border: 3px solid transparent; + border-top-color: #e74c3c; + -webkit-animation: spin 3s linear infinite; + animation: spin 3s linear infinite; +} +#loader:after { + content: ""; + position: absolute; + top: 15px; + left: 15px; + right: 15px; + bottom: 15px; + border-radius: 50%; + border: 3px solid transparent; + border-top-color: #f9c922; + -webkit-animation: spin 1.5s linear infinite; + animation: spin 1.5s linear infinite; +} +@-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + } + 100% { + -webkit-transform: rotate(360deg); + -ms-transform: rotate(360deg); + transform: rotate(360deg); + } +} +@keyframes spin { + 0% { + -webkit-transform: rotate(0); + -ms-transform: rotate(0); + transform: rotate(0); + } + 100% { + -webkit-transform: rotate(360deg); + -ms-transform: rotate(360deg); + transform: rotate(360deg); + } +} +#loader-wrapper .loader-section { + position: fixed; + top: 0; + width: 51%; + height: 100%; + background: #222; + z-index: 1000; +} +#loader-wrapper .loader-section.section-left { + left: 0; +} +#loader-wrapper .loader-section.section-right { + right: 0; +} +.loaded #loader-wrapper .loader-section.section-left { + -webkit-transform: translateX(-100%); + -ms-transform: translateX(-100%); + transform: translateX(-100%); + -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); + transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); +} +.loaded #loader-wrapper .loader-section.section-right { + -webkit-transform: translateX(100%); + -ms-transform: translateX(100%); + transform: translateX(100%); + -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); + transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); +} +.loaded #loader { + opacity: 0; + -webkit-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; +} +.loaded #loader-wrapper { + visibility: hidden; + -webkit-transform: translateY(-100%); + -ms-transform: translateY(-100%); + transform: translateY(-100%); + -webkit-transition: all 0.3s 1s ease-out; + transition: all 0.3s 1s ease-out; +} +/* Table styles */ +table.dataTable { + width: 100%; + margin: 0 auto; + clear: both; + border-collapse: separate; + border-spacing: 0; +} +table.dataTable thead th,table.dataTable tfoot th { + font-weight: bold; +} +.dataTables_scrollHeadInner{ + width: 100% !important; +} +.dataTable-table dataTable no-footer{ + width: 100% !important; +} +/*table.dataTable thead th,table.dataTable thead td { + /*padding: 10px 18px; + */ + /*border-bottom: 1px solid #111; +} +*/ +table.dataTable thead { + width: 100% !important; +} +/* Adds round border at full screen*/ +table.dataTable thead th:first-child,table.dataTable thead td { + border-top-left-radius: 15px; +} +/* Adds round border at full screen*/ +table.dataTable thead th:last-child,table.dataTable thead td { + border-top-right-radius: 15px; +} +table.dataTable thead th:active,table.dataTable thead td:active { + outline: none; +} +table.dataTable tfoot th,table.dataTable tfoot td { + padding: 10px 18px 6px 18px; + border-top: 1px solid #111; +} +table.dataTable thead .sorting,table.dataTable thead .sorting_asc,table.dataTable thead .sorting_desc,table.dataTable thead .sorting_asc_disabled,table.dataTable thead .sorting_desc_disabled { + cursor: pointer; + *cursor: hand; + background-repeat: no-repeat; + background-position: center right; +} +table.dataTable tbody tr { + background-color: #ffffff; +} +table.dataTable tbody tr.selected { + background-color: #B0BED9; +} +table.dataTable tbody th,table.dataTable tbody td { + padding: 8px 10px; +} +table.dataTable.row-border tbody th, table.dataTable.row-border tbody td, table.dataTable.display tbody th, table.dataTable.display tbody td { + border-top: 1px solid #ddd; +} +table.dataTable.row-border tbody tr:first-child th,table.dataTable.row-border tbody tr:first-child td, table.dataTable.display tbody tr:first-child th,table.dataTable.display tbody tr:first-child td { + border-top: none; +} +table.dataTable.cell-border tbody th, table.dataTable.cell-border tbody td { + border-top: 1px solid #ddd; + border-right: 1px solid #ddd; +} +table.dataTable.cell-border tbody tr th:first-child,table.dataTable.cell-border tbody tr td:first-child { + border-left: 1px solid #ddd; +} +table.dataTable.cell-border tbody tr:first-child th,table.dataTable.cell-border tbody tr:first-child td { + border-top: none; +} +table.dataTable.stripe tbody tr.odd, table.dataTable.display tbody tr.odd { + background-color: #f9f9f9; +} +table.dataTable.stripe tbody tr.odd.selected, table.dataTable.display tbody tr.odd.selected { + background-color: #acbad4; +} +table.dataTable.hover tbody tr:hover, table.dataTable.display tbody tr:hover { + background-color: #f6f6f6; +} +table.dataTable.hover tbody tr:hover.selected, table.dataTable.display tbody tr:hover.selected { + background-color: #aab7d1; +} +table.dataTable.order-column tbody tr > .sorting_1,table.dataTable.order-column tbody tr > .sorting_2,table.dataTable.order-column tbody tr > .sorting_3, table.dataTable.display tbody tr > .sorting_1,table.dataTable.display tbody tr > .sorting_2,table.dataTable.display tbody tr > .sorting_3 { + background-color: #fafafa; +} +table.dataTable.order-column tbody tr.selected > .sorting_1,table.dataTable.order-column tbody tr.selected > .sorting_2,table.dataTable.order-column tbody tr.selected > .sorting_3, table.dataTable.display tbody tr.selected > .sorting_1,table.dataTable.display tbody tr.selected > .sorting_2,table.dataTable.display tbody tr.selected > .sorting_3 { + background-color: #acbad5; +} +table.dataTable.display tbody tr.odd > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd > .sorting_1 { + background-color: #f1f1f1; +} +table.dataTable.display tbody tr.odd > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd > .sorting_2 { + background-color: #f3f3f3; +} +table.dataTable.display tbody tr.odd > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd > .sorting_3 { + background-color: whitesmoke; +} +table.dataTable.display tbody tr.odd.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_1 { + background-color: #a6b4cd; +} +table.dataTable.display tbody tr.odd.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_2 { + background-color: #a8b5cf; +} +table.dataTable.display tbody tr.odd.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.odd.selected > .sorting_3 { + background-color: #a9b7d1; +} +table.dataTable.display tbody tr.even > .sorting_1, table.dataTable.order-column.stripe tbody tr.even > .sorting_1 { + background-color: #fafafa; +} +table.dataTable.display tbody tr.even > .sorting_2, table.dataTable.order-column.stripe tbody tr.even > .sorting_2 { + background-color: #fcfcfc; +} +table.dataTable.display tbody tr.even > .sorting_3, table.dataTable.order-column.stripe tbody tr.even > .sorting_3 { + background-color: #fefefe; +} +table.dataTable.display tbody tr.even.selected > .sorting_1, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_1 { + background-color: #acbad5; +} +table.dataTable.display tbody tr.even.selected > .sorting_2, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_2 { + background-color: #aebcd6; +} +table.dataTable.display tbody tr.even.selected > .sorting_3, table.dataTable.order-column.stripe tbody tr.even.selected > .sorting_3 { + background-color: #afbdd8; +} +table.dataTable.display tbody tr:hover > .sorting_1, table.dataTable.order-column.hover tbody tr:hover > .sorting_1 { + background-color: #eaeaea; +} +table.dataTable.display tbody tr:hover > .sorting_2, table.dataTable.order-column.hover tbody tr:hover > .sorting_2 { + background-color: #ececec; +} +table.dataTable.display tbody tr:hover > .sorting_3, table.dataTable.order-column.hover tbody tr:hover > .sorting_3 { + background-color: #efefef; +} +table.dataTable.display tbody tr:hover.selected > .sorting_1, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_1 { + background-color: #a2aec7; +} +table.dataTable.display tbody tr:hover.selected > .sorting_2, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_2 { + background-color: #a3b0c9; +} +table.dataTable.display tbody tr:hover.selected > .sorting_3, table.dataTable.order-column.hover tbody tr:hover.selected > .sorting_3 { + background-color: #a5b2cb; +} +/*table.dataTable.no-footer { + /*border-bottom: 1px solid #111; +} +*/ +table.dataTable.nowrap th, table.dataTable.nowrap td { + white-space: nowrap; +} +table.dataTable.compact thead th,table.dataTable.compact thead td { + padding: 4px 17px; +} +table.dataTable.compact tfoot th,table.dataTable.compact tfoot td { + padding: 4px; +} +table.dataTable.compact tbody th,table.dataTable.compact tbody td { + padding: 4px; +} +table.dataTable th.dt-left,table.dataTable td.dt-left { + text-align: left; +} +table.dataTable th.dt-center,table.dataTable td.dt-center,table.dataTable td.dataTables_empty { + text-align: center; +} +table.dataTable th.dt-right,table.dataTable td.dt-right { + text-align: right; +} +table.dataTable th.dt-justify,table.dataTable td.dt-justify { + text-align: justify; +} +table.dataTable th.dt-nowrap,table.dataTable td.dt-nowrap { + white-space: nowrap; +} +table.dataTable thead th.dt-head-left,table.dataTable thead td.dt-head-left,table.dataTable tfoot th.dt-head-left,table.dataTable tfoot td.dt-head-left { + text-align: left; +} +table.dataTable thead th.dt-head-center,table.dataTable thead td.dt-head-center,table.dataTable tfoot th.dt-head-center,table.dataTable tfoot td.dt-head-center { + text-align: center; +} +table.dataTable thead th.dt-head-right,table.dataTable thead td.dt-head-right,table.dataTable tfoot th.dt-head-right,table.dataTable tfoot td.dt-head-right { + text-align: right; +} +table.dataTable thead th.dt-head-justify,table.dataTable thead td.dt-head-justify,table.dataTable tfoot th.dt-head-justify,table.dataTable tfoot td.dt-head-justify { + text-align: justify; +} +table.dataTable thead th.dt-head-nowrap,table.dataTable thead td.dt-head-nowrap,table.dataTable tfoot th.dt-head-nowrap,table.dataTable tfoot td.dt-head-nowrap { + white-space: nowrap; +} +table.dataTable tbody th.dt-body-left,table.dataTable tbody td.dt-body-left { + text-align: left; +} +table.dataTable tbody th.dt-body-center,table.dataTable tbody td.dt-body-center { + text-align: center; +} +table.dataTable tbody th.dt-body-right,table.dataTable tbody td.dt-body-right { + text-align: right; +} +table.dataTable tbody th.dt-body-justify,table.dataTable tbody td.dt-body-justify { + text-align: justify; +} +table.dataTable tbody th.dt-body-nowrap,table.dataTable tbody td.dt-body-nowrap { + white-space: nowrap; +} +table.dataTable,table.dataTable th,table.dataTable td { + box-sizing: content-box; + font-size: 14px; +} +/** Control feature layout*/ +.dataTables_wrapper { + position: relative; + clear: both; + *zoom: 1; + zoom: 1; +} +.dataTables_wrapper .dataTables_length { + float: left; +} +.dataTables_wrapper .dataTables_filter { + float: right; + text-align: right; + padding-bottom: 5px; +} +.dataTables_wrapper .dataTables_filter input { + margin-left: 0.5em; +} +.dataTables_wrapper .dataTables_info { + clear: both; + float: left; + padding-top: 0.755em; +} +.dataTables_wrapper .dataTables_paginate { + float: right; + text-align: right; + /*padding-top: 0.25em; + */ +} +.dataTables_wrapper .dataTables_paginate .paginate_button { + box-sizing: border-box; + display: inline-block; + min-width: 1.5em; + /*padding: 0.5em 1em; + */ + /*margin-left: 2px; + */ + text-align: center; + text-decoration: none !important; + cursor: pointer; + *cursor: hand; + color: #333 !important; + /*border: 1px solid transparent; + */ + border-radius: 2px; +} +.dataTables_wrapper .dataTables_paginate .paginate_button.current, .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover { + color: #333 !important; + border: 1px solid #979797; + background-color: white; + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, white), color-stop(100%, #dcdcdc)); + /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, white 0%, #dcdcdc 100%); + /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, white 0%, #dcdcdc 100%); + /* FF3.6+ */ + background: -ms-linear-gradient(top, white 0%, #dcdcdc 100%); + /* IE10+ */ + background: -o-linear-gradient(top, white 0%, #dcdcdc 100%); + /* Opera 11.10+ */ + background: linear-gradient(to bottom, white 0%, #dcdcdc 100%); + /* W3C */ +} +.dataTables_wrapper .dataTables_paginate .paginate_button.disabled, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover, .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active { + cursor: default; + color: #666 !important; + /*border: 1px solid transparent; + */ + background: transparent; + box-shadow: none; +} +.dataTables_wrapper .dataTables_paginate .paginate_button:hover { + color: white !important; + /*border: 1px solid #111; + */ + background-color: #585858; + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #585858), color-stop(100%, #111)); + /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #585858 0%, #111 100%); + /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #585858 0%, #111 100%); + /* FF3.6+ */ + background: -ms-linear-gradient(top, #585858 0%, #111 100%); + /* IE10+ */ + background: -o-linear-gradient(top, #585858 0%, #111 100%); + /* Opera 11.10+ */ + background: linear-gradient(to bottom, #585858 0%, #111 100%); + /* W3C */ +} +.dataTables_wrapper .dataTables_paginate .paginate_button:active { + outline: none; + background-color: #2b2b2b; + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #2b2b2b), color-stop(100%, #0c0c0c)); + /* Chrome,Safari4+ */ + background: -webkit-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); + /* Chrome10+,Safari5.1+ */ + background: -moz-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); + /* FF3.6+ */ + background: -ms-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); + /* IE10+ */ + background: -o-linear-gradient(top, #2b2b2b 0%, #0c0c0c 100%); + /* Opera 11.10+ */ + background: linear-gradient(to bottom, #2b2b2b 0%, #0c0c0c 100%); + /* W3C */ + box-shadow: inset 0 0 3px #111; +} +.dataTables_wrapper .dataTables_paginate .ellipsis { + padding: 0 1em; +} +.dataTables_wrapper .dataTables_processing { + position: absolute; + top: 50%; + left: 50%; + width: 100%; + height: 40px; + margin-left: -50%; + margin-top: -25px; + padding-top: 20px; + text-align: center; + font-size: 1.2em; + background-color: white; + background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(25%, rgba(255, 255, 255, 0.9)), color-stop(75%, rgba(255, 255, 255, 0.9)), color-stop(100%, rgba(255, 255, 255, 0))); + background: -webkit-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + background: -moz-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + background: -ms-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + background: -o-linear-gradient(left, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); + background: linear-gradient(to right, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.9) 25%, rgba(255, 255, 255, 0.9) 75%, rgba(255, 255, 255, 0) 100%); +} +.dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter,.dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_processing,.dataTables_wrapper .dataTables_paginate { + color: #333; +} +.dataTables_wrapper .dataTables_scroll { + clear: both; + /*box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + box-shadow: 0px 25px 20px -25px rgba(0, 0, 0, 0.2), 25px 0px 20px -25px rgba(0, 0, 0, 0.19); + box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); + -webkit-box-shadow: 20px 20px 10px -10px rgba(184,184,184,0.1); + -moz-box-shadow: 20px 20px 10px -10px rgba(184,184,184,0.1); + box-shadow: 20px 20px 10px -10px rgba(184,184,184,0.1); + */ +} +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody { + *margin-top: -1px; + -webkit-overflow-scrolling: touch; +} +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td { + vertical-align: middle; +} +.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > th > div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > thead > tr > td > div.dataTables_sizing, .dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > th > div.dataTables_sizing,.dataTables_wrapper .dataTables_scroll div.dataTables_scrollBody > table > tbody > tr > td > div.dataTables_sizing { + height: 0; + overflow: hidden; + margin: 0 !important; + padding: 0 !important; +} +.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable { + width: 100% !important; +} +.dataTables_wrapper.no-footer div.dataTables_scrollHead table.dataTable,.dataTables_wrapper.no-footer div.dataTables_scrollBody > table { + border-bottom: none; + /*border-top-right-radius: 15px; + */ +} +.dataTables_wrapper:after { + visibility: hidden; + display: block; + content: ""; + clear: both; + height: 0; +} +@media screen and (max-width: 767px) { + .dataTables_wrapper .dataTables_info,.dataTables_wrapper .dataTables_paginate { + float: none; + text-align: center; + } + .dataTables_wrapper .dataTables_paginate { + margin-top: 0.5em; + } +} +@media screen and (max-width: 640px) { + .dataTables_wrapper .dataTables_length,.dataTables_wrapper .dataTables_filter { + float: none; + text-align: center; + } + .dataTables_wrapper .dataTables_filter { + margin-top: 0.5em; + } +} diff --git a/examples/Get-PokeDeviceReport/Get-PokeDeviceReport.ps1 b/examples/Get-PokeDeviceReport/Get-PokeDeviceReport.ps1 new file mode 100644 index 0000000..832f7fe --- /dev/null +++ b/examples/Get-PokeDeviceReport/Get-PokeDeviceReport.ps1 @@ -0,0 +1,412 @@ +<# + .SYNOPSIS + Gets an BCDR device report from the Poke API. + + .DESCRIPTION + The Get-PokeDeviceReport script gets an BCDR device report from the Poke API. + + Can be run against a single BCDR device or all BCDR devices registered in the Poke portal + + This is a proof of concept script. It is not intended to be used in production. + + .PARAMETER Api_Key_Public + Defines your Poke API public key. + + .PARAMETER Api_Key_Secret + Defines your Poke API secret key. + + .PARAMETER APIEndPoint + Define what Poke endpoint to connect to. + + The default is https://pokeapi.co/api/v2 + + .PARAMETER serialNumber + Defines the BCDR's serial number that should be returned. + + This is optional. If not specified, all BCDR agents will be returned. + + .PARAMETER Days + Defines the number of days a BCDR was last seen to classify as InActive. + + The default is 7 days. + + .PARAMETER Report + Defines if the script should output the results to a CSV, HTML or Both. + + .PARAMETER ShowReport + Switch statement to open the report folder after the script runs. + + .EXAMPLE + Get-PokeDeviceReport -Api_Key_Public 12345 -Api_Key_Secret 12345 + + Gets all registered BCDR's from the Poke portal. + + Returned data is outputted to a CSV file. + + .EXAMPLE + Get-PokeDeviceReport -Api_Key_Public 12345 -Api_Key_Secret 12345 -serialNumber 1234567890 + + Gets the defined BCDR device from the Poke portal. + + Returned data is outputted to a CSV file. + + .EXAMPLE + Get-PokeDeviceReport -Api_Key_Public 12345 -Api_Key_Secret 12345 -Report All + + Gets all registered BCDR's from the Poke portal. + + Returned data is outputted to both a CSV & HTML file. + + .NOTES + N\A + + .LINK + https://celerium.org/ + + .LINK + https://github.com/Celerium/PokeAPI-PowerShellWrapper + +#> + +#Requires -Version 5.0 + +#Region [ Parameters ] + + [CmdletBinding()] + param( + [Parameter(Mandatory=$True)] + [string]$Api_Key_Public, + + [Parameter(Mandatory=$True)] + [string]$Api_Key_Secret, + + [Parameter(Mandatory=$false)] + $APIEndpoint = 'https://pokeapi.co/api/v2', + + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [string]$serialNumber, + + [Parameter(Mandatory=$false)] + [ValidateRange([Int]::MinValue,-1)] + [Int]$Days = (-7), + + [Parameter(Mandatory=$false)] + [ValidateSet('All','CSV','HTML')] + [String]$Report = 'CSV', + + [Parameter(Mandatory=$false)] + [Switch]$ShowReport + + ) + +#EndRegion [ Parameters ] + +'' +Write-Output "Start - $(Get-Date -Format yyyy-MM-dd-HH:mm)" +'' + +#Region [ Prerequisites ] + + $ScriptName = 'Get-PokeDeviceReport' + $ReportFolderName = "$ScriptName-Report" + $FileDate = Get-Date -Format 'yyyy-MM-dd-HHmm' + $HTMLDate = (Get-Date -Format 'yyyy-MM-dd h:mmtt').ToLower() + + #Install Poke Module + Try { + If(Get-PackageProvider -ListAvailable -Name NuGet -ErrorAction Stop){} + Else{ + Install-PackageProvider -Name NuGet -Confirm:$False + } + + If(Get-Module -ListAvailable -Name PokeAPI) { + Import-module PokeAPI -ErrorAction Stop + } + Else { + Install-Module PokeAPI -Force -ErrorAction Stop + Import-Module PokeAPI -ErrorAction Stop + } + } + Catch { + Write-Error $_ + break + } + + + #Settings Poke login information + Add-PokeBaseURI -base_uri $APIEndpoint + Add-PokeAPIKey -Api_Key_Public $Api_Key_Public -Api_Key_Secret $Api_Key_Secret -ErrorAction Stop + + + #Define & create logging location + Try{ + + $Log = "C:\Audits\$ReportFolderName" + + If ($Report -ne 'Console'){ + $CSVReport = "$Log\$ScriptName-$FileDate.csv" + $HTMLReport = "$Log\$ScriptName-$FileDate.html" + + If ((Test-Path -Path $Log -PathType Container) -eq $false){ + New-Item -Path $Log -ItemType Directory > $Null + } + } + } + Catch{ + Write-Host $_.Exception.Message -ForegroundColor Red -BackgroundColor Black + '' + Write-Error $_ + break + } + +#Region [ Bytes Function ] + +Function Convert-BytesToSize { + [CmdletBinding()] + Param( + [parameter(Mandatory=$False)] + [uint64]$Size + ) + + Switch ($Size){ + {$Size -gt 10000000000000000000} { + Write-Verbose "Convert to EB" + $NewSize = "$([math]::Round(($Size / 10000000000000000000),2)) EB" + Break + } + {$Size -gt 1PB} { + Write-Verbose "Convert to PB" + $NewSize = "$([math]::Round(($Size / 1PB),2)) PB" + Break + } + {$Size -gt 1TB}{ + Write-Verbose "Convert to TB" + $NewSize = "$([math]::Round(($Size / 1TB),2)) TB" + Break + } + {$Size -gt 1GB}{ + Write-Verbose "Convert to GB" + $NewSize = "$([math]::Round(($Size / 1GB),2)) GB" + Break + } + {$Size -gt 1MB}{ + Write-Verbose "Convert to MB" + $NewSize = "$([math]::Round(($Size / 1MB),2)) MB" + Break + } + {$Size -gt 1KB}{ + Write-Verbose "Convert to KB" + $NewSize = "$([math]::Round(($Size / 1KB),2)) KB" + Break + } + Default{ + Write-Verbose "Convert to Bytes" + $NewSize = "$([math]::Round($Size,2)) Bytes" + Break + } + } + Return $NewSize +} + +#EndRegion [ Bytes Function] + + +#EndRegion [ Prerequisites ] + +Write-Output " - (1/3) - $(Get-Date -Format MM-dd-HH:mm) - Getting Poke BCDR's from the API" + +#Region [ Poke API ] + + #Customize the results + Try{ + + if ($serialNumber){ + $PokeDeviceResults = Get-PokeDevice -serialNumber $serialNumber + } + else{ + $PokeDeviceResults = Get-PokeDevice + $PokeDeviceResults = ($PokeDeviceResults).items + } + + $PokeAgentResults = $PokeDeviceResults | Select-Object ` + @{Name='resellerCompanyName';Expression={$_.resellerCompanyName}}, ` + @{Name='clientCompanyName';Expression={$_.clientCompanyName}}, ` + @{Name='status';Expression={ if ([DateTime]$_.lastSeenDate -lt (Get-Date).AddDays([Int]$Days).ToUniversalTime()) {'InActive'} + else {'Active'} }}, ` + @{Name='hidden';Expression={$_.hidden}}, ` + @{Name='Name';Expression={$_.Name}}, ` + @{Name='Model';Expression={$_.Model}}, ` + @{Name='serialNumber';Expression={$_.serialNumber}}, ` + @{Name='lastSeenDate';Expression={$_.lastSeenDate}}, ` + @{Name='registrationDate';Expression={$_.registrationDate}}, ` + @{Name='servicePeriod';Expression={$_.servicePeriod}}, ` + @{Name='warrantyExpire';Expression={$_.warrantyExpire}}, ` + @{Name='localStorageUsed';Expression={Convert-BytesToSize -Size ($_.localStorageUsed.size * 1024)}}, ` + @{Name='localStorageAvailable';Expression={Convert-BytesToSize -Size ($_.localStorageAvailable.size * 1024)}}, ` + @{Name='offsiteStorageUsed';Expression={Convert-BytesToSize -Size ($_.offsiteStorageUsed.size)}}, ` + @{Name='activeTickets';Expression={$_.activeTickets}}, ` + @{Name='agentCount';Expression={$_.agentCount}}, ` + @{Name='shareCount';Expression={$_.shareCount}}, ` + @{Name='alertCount';Expression={$_.alertCount}}, ` + @{Name='internalIP';Expression={$_.internalIP}}, ` + @{Name='uptime';Expression={ + $Up = New-TimeSpan -Seconds $_.uptime + $Up.Days.ToString() + ' days, ' + $Up.Hours.ToString() + ' hrs, ' + $Up.Minutes.ToString() + ' mins, ' + }}, ` + @{Name='servicePlan';Expression={$_.servicePlan}}, ` + @{Name='remoteWebUrl';Expression={$_.remoteWebUrl}} + } + Catch{ + Write-Host $_.Exception.Message -ForegroundColor Red -BackgroundColor Black + '' + Write-Error $_ + break + } + +#EndRegion [ Poke API ] + +#Region [ CSV Report ] + Try{ + If($Report -eq 'All' -or $Report -eq 'CSV'){ + Write-Output " - (2/3) - $(Get-Date -Format MM-dd-HH:mm) - Generating CSV" + $PokeAgentResults | Sort-Object clientCompanyName | Select-Object $ScriptName,* | Export-Csv $CSVReport -NoTypeInformation + } + } + Catch{ + Write-Host $_.Exception.Message -ForegroundColor Red -BackgroundColor Black + '' + Write-Error $_ + break + } + +#EndRegion [ CSV Report ] + +#Region [ HTML Report] + + Try{ + If ($Report -eq 'All' -or $Report -eq 'HTML'){ + Write-Output " - (3/3) - $(Get-Date -Format MM-dd-HH:mm) - Generating HTML" + + #HTML card header data to highlight useful information + $TotalDevices = ($PokeAgentResults.serialNumber).count + $DeviceTypes = ($PokeAgentResults.Model | Select-Object -Unique).count + $LocalStorage = $(Convert-BytesToSize -Size $( ($PokeDeviceResults.localStorageUsed | Measure-Object -Property Size -Sum).sum * 1024)) + $OffsiteStorage = $(Convert-BytesToSize -Size $( ($PokeDeviceResults.offsiteStorageUsed | Measure-Object -Property Size -Sum).sum )) + $ActiveTickets = ($PokeAgentResults.activeTickets | Measure-Object -Sum).sum + $TotalAgents = ($PokeAgentResults.agentCount | Measure-Object -Sum).sum + $TotalShares = ($PokeAgentResults.shareCount | Measure-Object -Sum).sum + $TotalAlerts = ($PokeAgentResults.alertCount | Measure-Object -Sum).sum + + #Region [ HTML Report Building Blocks ] + + # Build the HTML header + # This grabs the raw text from files to shorten the amount of lines in the PSScript + # General idea is that the HTML assets would infrequently be changed once set + $Meta = Get-Content -Path "$PSScriptRoot\Assets\Meta.html" -Raw + $Meta = $Meta -replace 'xTITLECHANGEx',"$ScriptName" + $CSS = Get-Content -Path "$PSScriptRoot\Assets\Styles.css" -Raw + $JavaScript = Get-Content -Path "$PSScriptRoot\Assets\JavaScriptHeader.html" -Raw + $Head = $Meta + ("") + $JavaScript + + # HTML Body Building Blocks (In order) + $TopNav = Get-Content -Path "$PSScriptRoot\Assets\TopBar.html" -Raw + $DivMainStart = '
' + $SideBar = Get-Content -Path "$PSScriptRoot\Assets\SideBar.html" -Raw + $SideBar = $SideBar -replace ('xTIMESETx',"$HTMLDate") + $DivSecondStart = '
' + $PreLoader = Get-Content -Path "$PSScriptRoot\Assets\PreLoader.html" -Raw + $MainStart = '
' + + #Base Table Container + $BaseTableContainer = Get-Content -Path "$PSScriptRoot\Assets\TableContainer.html" -Raw + + #Summary Header + $SummaryTableContainer = $BaseTableContainer + $SummaryTableContainer = $SummaryTableContainer -replace ('xHEADERx',"$ScriptName - Summary") + $SummaryTableContainer = $SummaryTableContainer -replace ('xBreadCrumbx','') + + #Summary Cards + #HTML in Summary.html would be edited depending on the report and summary info you want to show + $SummaryCards = Get-Content -Path "$PSScriptRoot\Assets\Summary.html" -Raw + $SummaryCards = $SummaryCards -replace ('xCARD1Valuex',$TotalDevices) + $SummaryCards = $SummaryCards -replace ('xCARD2Valuex',$DeviceTypes) + $SummaryCards = $SummaryCards -replace ('xCARD3Valuex',$LocalStorage) + $SummaryCards = $SummaryCards -replace ('xCARD4Valuex',$OffsiteStorage) + $SummaryCards = $SummaryCards -replace ('xCARD5Valuex',$ActiveTickets) + $SummaryCards = $SummaryCards -replace ('xCARD6Valuex',$TotalAgents) + $SummaryCards = $SummaryCards -replace ('xCARD7Valuex',$TotalShares) + $SummaryCards = $SummaryCards -replace ('xCARD8Valuex',$TotalAlerts) + + #Body table headers, would be duplicated\adjusted depending on how many tables you want to show + $BodyTableContainer = $BaseTableContainer + $BodyTableContainer = $BodyTableContainer -replace ('xHEADERx',"$ScriptName - Details") + $BodyTableContainer = $BodyTableContainer -replace ('xBreadCrumbx',"Data gathered from $(hostname)") + + #Ending HTML + $DivEnd = '
' + $MainEnd = '' + $JavaScriptEnd = Get-Content -Path "$PSScriptRoot\Assets\JavaScriptEnd.html" -Raw + + #EndRegion [ HTML Report Building Blocks ] + #Region [ Example HTML Report Data\Structure ] + + #Creates an HTML table from PowerShell function results without any extra HTML tags + $TableResults = $PokeAgentResults | ConvertTo-Html -As Table -Fragment -Property clientCompanyName,status,Name,Model,localStorageUsed,offsiteStorageUsed,lastSeenDate,warrantyExpire ` + -PostContent '
    +
  • Note: SAMPLE 1 = Only applies to stuff and things
  • +
  • Note: SAMPLE 2 = Only applies to stuff and things
  • +
  • Note: SAMPLE 3 = Only applies to stuff and things
  • +
+ ' + + #Table section segregation + #PS doesn't create a
tag so I have find the first row and make it so + $TableHeader = $TableResults -split "`r`n" | Where-Object {$_ -match 'as it contains no data + $TableColumnGroup = $TableResults -split "`r`n" | Where-Object {$_ -match ''} + + #Table ModIfications + #Replacing empty html table tags with simple replaceable names + #It was annoying me that empty rows showed in the raw HTML and I couldn't delete them as they were not $NUll but were empty + $TableResults = $TableResults -replace ($TableHeader,'xblanklinex') + $TableResults = $TableResults -replace ($TableColumnGroup,'xblanklinex') + $TableResults = $TableResults | Where-Object {$_ -ne 'xblanklinex'} | ForEach-Object {$_.Replace('xblanklinex','')} + + #Inject modified data back into the table + #Makes the table have a tag + $TableResults = $TableResults -replace '
TrueTrue
'} + #Unsure why PS makes empty
',"
`n$TableHeader" + $TableResults = $TableResults -replace '
','
' + + #Mark Focus Data to draw attention\talking points + #Need to understand RegEx more as this doesn't scale at all + $TableResults = $TableResults -replace '','' + + + #Building the final HTML report using the various ordered HTML building blocks from above. + #This is injecting html\css\javascript in a certain order into a file to make an HTML report + $HTML = ConvertTo-HTML -Head $Head -Body " $TopNav $DivMainStart $SideBar $DivSecondStart $PreLoader $MainStart + $SummaryTableContainer $SummaryCards $DivEnd $DivEnd $DivEnd + $BodyTableContainer $TableResults $DivEnd $DivEnd $DivEnd + $MainEnd $DivEnd $DivEnd $JavaScriptEnd + " + $HTML = $HTML -replace '','' + $HTML | Out-File $HTMLReport -Encoding utf8 + + } +} +Catch{ + Write-Host $_.Exception.Message -ForegroundColor Red -BackgroundColor Black + '' + Write-Error $_ + break +} +#EndRegion [ HTML Report ] + + If ($ShowReport){ + Invoke-Item $Log + } + +'' +Write-Output "END - $(Get-Date -Format yyyy-MM-dd-HH:mm)" +'' \ No newline at end of file diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..155f2f6 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,34 @@ +

+
+ _CeleriumDemo +
+ Celerium_PokeAPI_Examples +
+

+ +--- + +## Examples + +- :book: Project documentation can be found on [Github Pages](https://celerium.github.io/PokeAPI-PowerShellWrapper/) +- :book: Poke's REST API documentation on their management portal [here](https://portal.Pokebackup.com/integrations/api) *[ Requires a login ]*. + +:warning: Please note that the following examples are provided **"AS IS"** and only serve as a proof of concept to show possible uses of the [PokeAPI](https://github.com/Celerium/PokeAPI-PowerShellWrapper) PowerShell wrapper. + +--- + +## Buy me a coffee + +Whether you use this project, have learned something from it, or just like it, please consider supporting it by buying me a coffee, so I can dedicate more time on open-source projects like this :) + +Buy Me A Coffee + +--- + +## Agent Reports + +![Agent Reports](https://raw.githubusercontent.com/Celerium/PokeAPI-PowerShellWrapper/main/.github/images/Celerium_PokeAgentsReport.png) + +## Device Reports + +![Device Reports](https://raw.githubusercontent.com/Celerium/PokeAPI-PowerShellWrapper/main/.github/images/Celerium_PokeDevicesReport.png) diff --git a/tests/HelpComment.Tests.ps1 b/tests/HelpComment.Tests.ps1 new file mode 100644 index 0000000..e354438 --- /dev/null +++ b/tests/HelpComment.Tests.ps1 @@ -0,0 +1,239 @@ +<# +.NOTES + Copyright 1990-2024 Celerium + + NAME: HelpComment.Tests.ps1 + Type: PowerShell + + AUTHOR: David Schulte + DATE: 2023-04-1 + EMAIL: celerium@Celerium.org + Updated: 2023-09-16 + + TODO: + Build out more robust, logical, & scalable pester tests. + Huge thank you to LazyWinAdmin, Vexx32, & JeffBrown for their blog posts! + +.SYNOPSIS + Pester tests for the PowerShell help comments. + +.DESCRIPTION + Pester tests for the PowerShell help comments. + +.PARAMETER moduleName + The name of the local module to import + +.PARAMETER Version + The version of the local module to import + +.PARAMETER buildTarget + Which version of the module to run tests against + + Allowed values: + 'built', 'notBuilt' + +.EXAMPLE + Invoke-Pester -Path .\Tests\Private\apiKeys\Get-PokeAPIKey.Tests.ps1 -Output Detailed + + Runs a pester test and outputs detailed results + +.INPUTS + N\A + +.OUTPUTS + N\A + +.LINK + https://celerium.org + +.LINK + https://vexx32.github.io/2020/07/08/Verify-Module-Help-Pester/ + https://lazywinadmin.com/2016/05/using-pester-to-test-your-comment-based.html + https://jeffbrown.tech/getting-started-with-pester-testing-in-powershell/ + https://github.com/Celerium/PokeAPI-PowerShellWrapper + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.5.0' } + +#Region [ Parameters ] + +#Available in Discovery & Run +[CmdletBinding()] +param ( + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [String]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$version, + + [Parameter(Mandatory=$true)] + [ValidateSet('built','notBuilt')] + [string]$buildTarget +) + +#EndRegion [ Parameters ] + +#Region [ Prerequisites ] + +#Available in Describe and Context but NOT It +#Can be used in [ It ] with [ -TestCases @{ VariableName = $VariableName } ] + BeforeDiscovery{ + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + $pester_TestName = (Get-Item -Path $PSCommandPath).Name + + switch ($buildTarget){ + 'built' { $modulePath = Join-Path -Path $rootPath -ChildPath "\build\$moduleName\$version" } + 'notBuilt' { $modulePath = Join-Path -Path $rootPath -ChildPath "$moduleName" } + } + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + $modulePsd1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + + Import-Module -Name $modulePsd1 -ErrorAction Stop -ErrorVariable moduleError *> $null + + if ($moduleError){ + $moduleError + exit 1 + } + + $module = Get-Module $moduleName + $moduleFunctions = @( + $Module.ExportedFunctions.Keys + $Module.ExportedCmdlets.Keys + ) + + } + + AfterAll{ + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + } + +#EndRegion [ Prerequisites ] + +Describe "Testing the [ $buildTarget ] version of [ $moduleName ] with [ $pester_TestName ]" { + + Describe "[ $moduleName ] module help tests" -ForEach $moduleFunctions { + + BeforeDiscovery { + + $functionName = $_ + $ShouldProcessParameters = 'WhatIf', 'Confirm' + + $help_Function = Get-Help -Name $functionName -Full + + $help_Parameters = [System.Collections.Generic.List[object]]::new() + Get-Help -Name $functionName -Parameter * -ErrorAction Ignore | + Where-Object { $_.Name -and $_.Name -notin $ShouldProcessParameters } | + ForEach-Object { + $data = [PSCustomObject]@{ + name = $_.name + description = $_.description.Text + defaultValue = $_.defaultValue + parameterValue = $_.parameterValue + type = $_.type + required = $_.required + globbing = $_.globbing + pipelineInput = $_.pipelineInput + position = $_.position + } + $help_Parameters.Add($data) > $null + } + + <# + #PowerShell Abstract Syntax Tree \ will be $null if the command is a compiled cmdlet + #https://vexx32.github.io/2020/07/08/Verify-Module-Help-Pester/ + $help_Ast = @{ + Ast = (Get-Content -Path "function:\$functionName" -ErrorAction Ignore).Ast + Parameters = $help_Parameters + } + #> + + $help_Examples = [System.Collections.Generic.List[object]]::new() + $help_Function.Examples.Example | + ForEach-Object { + $data = [PSCustomObject]@{ + introduction = $_.introduction + code = $_.code + remarks = $_.remarks + title = $_.title -replace '-','' + } + $help_Examples.Add($data) > $null + } + + } + + Context "[ $functionName ]" -ForEach @{ help_Function = $help_Function } { + + It "[ $functionName ] contains comment based help" { + $help_Function | Should -Not -BeNullOrEmpty + } + + It "[ $functionName ] contains a synopsis" { + $help_Function.Synopsis | Should -Not -BeNullOrEmpty + } + + It "[ $functionName ] contains a description" { + $help_Function.Description | Should -Not -BeNullOrEmpty + } + + It "[ $functionName ] contains at least one usage example" { + $help_Function.Examples | Should -Not -BeNullOrEmpty + ($help_Function.Examples.Example | Measure-Object).Count | Should -BeGreaterOrEqual 1 + } + + It "[ $functionName ] contains a note" { + $help_Function.alertSet.alert.text -split '\n' | Should -Not -BeNullOrEmpty + } + + It "[ $functionName ] contains a link" { + $help_Function.relatedLinks.navigationLink.uri| Should -Not -BeNullOrEmpty + } + + <# + # This will be skipped for compiled commands ($help_Ast.Ast will be $null) + It "[ $functionName ] has a help entry for all parameters" -Skip:(-not ($help_Parameters -and $help_Ast.Ast) ) { + @($help_Parameters).Count | Should -Be $help_Ast.Ast.Body.ParamBlock.Parameters.Count -Because 'the number of parameters in the help should match the number in the function script' + } + #> + + if ($null -eq $help_Parameters.Name){ + It "[ $functionName ] - Parameter has a description -" { + Set-ItResult -Skipped -Because "there are no parameters in this function" + } + } + else{ + It "[ $functionName ] - Parameter has a description - [ <_.name> ]" -TestCases $help_Parameters { + $_.description | Should -Not -BeNullOrEmpty -Because "[ <_.name> ] should have a description!" + } + } + + It "[ $functionName ] - Example has example code & description - [ <_.title -replace '-'.''> ]" -TestCases $help_Examples { + $_.code | Should -Not -BeNullOrEmpty -Because "[ <_.title -replace '-'.''> ] should have example code!" + $_.Remarks | Should -Not -BeNullOrEmpty -Because "[ <_.title -replace '-'.''> ] should have a description!" + } + + } + + } + +} \ No newline at end of file diff --git a/tests/PSScriptAnalyzer.tests.ps1 b/tests/PSScriptAnalyzer.tests.ps1 new file mode 100644 index 0000000..5325b98 --- /dev/null +++ b/tests/PSScriptAnalyzer.tests.ps1 @@ -0,0 +1,167 @@ +<# +.NOTES + Copyright 1990-2024 Celerium + + NAME: PSScriptAnalyzer.tests.ps1 + Type: PowerShell + + AUTHOR: David Schulte + DATE: 2023-04-1 + EMAIL: celerium@Celerium.org + Updated: 2023-09-16 + + TODO: + +.SYNOPSIS + Pester tests for the PSScriptAnalyzer. + +.DESCRIPTION + The PSScriptAnalyzer.tests.ps1 script test every rule against + every module file. + +.PARAMETER moduleName + The name of the local module to import + +.PARAMETER Version + The version of the local module to import + +.PARAMETER buildTarget + Which version of the module to run tests against + + Allowed values: + 'built', 'notBuilt' + +.EXAMPLE + Invoke-Pester -Path .\Tests\Private\apiKeys\Get-PokeAPIKey.Tests.ps1 + + Runs a pester test and outputs simple results + +.EXAMPLE + Invoke-Pester -Path .\Tests\Private\apiKeys\Get-PokeAPIKey.Tests.ps1 -Output Detailed + + Runs a pester test and outputs detailed results + +.INPUTS + N\A + +.OUTPUTS + N\A + +.LINK + https://celerium.org + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.5.0' } + +#Region [ Parameters ] + +#Available in Discovery & Run +[CmdletBinding()] +param ( + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [String]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$version, + + [Parameter(Mandatory=$true)] + [ValidateSet('built','notBuilt')] + [string]$buildTarget +) + +#EndRegion [ Parameters ] + +#Region [ Prerequisites ] + +#Available in Describe and Context but NOT It +#Can be used in [ It ] with [ -TestCases @{ VariableName = $VariableName } ] + BeforeDiscovery{ + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + $pester_TestName = (Get-Item -Path $PSCommandPath).Name + #$commandName = $pester_TestName -replace '.Tests.ps1','' + + switch ($buildTarget){ + 'built' { $modulePath = Join-Path -Path $rootPath -ChildPath "\build\$moduleName\$version" } + 'notBuilt' { $modulePath = Join-Path -Path $rootPath -ChildPath "$moduleName" } + } + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + $modulePsd1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + + Import-Module -Name $modulePsd1 -ErrorAction Stop -ErrorVariable moduleError *> $null + + if ($moduleError){ + $moduleError + exit 1 + } + + $moduleFiles = Get-ChildItem -Path $modulePath -Include *.ps* -Recurse + $ScriptAnalyzerRules = Get-ScriptAnalyzerRule + + } + + AfterAll{ + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + } + +#EndRegion [ Prerequisites ] + +Describe "Testing the [ $buildTarget ] version of [ $moduleName ] with [ $pester_TestName ]" { + + Describe "[ $moduleName ] module PSScriptAnalyzer tests" -ForEach $moduleFiles { + + BeforeDiscovery { $moduleFile = $_ } + + Context "[ $($moduleFile.Name) ]" -ForEach $ScriptAnalyzerRules { + + BeforeDiscovery { $Rule = $_ } + + It "Should pass rule [ $($Rule.RuleName) ]" -TestCases @{ moduleFile = $moduleFile ; Rule = $Rule } { + + $invoke_Params = @{ + Path = $moduleFile.FullName + IncludeRule = $($Rule.RuleName) + ExcludeRule = 'PSUseSingularNouns','PSAvoidUsingConvertToSecureStringWithPlainText' + Severity = 'Warning','Error' + } + $invoke_Results = Invoke-ScriptAnalyzer @invoke_Params + + ($invoke_Results | Measure-Object).Count | Should -Be 0 + + if ( ($invoke_Results | Measure-Object).Count -ne 0 ) { + + #Help show what & where a rule errored [ $PesterPreference.Should.ErrorAction = 'Continue' ] + foreach ($result in $invoke_Results) { + $result.Line | Should -Be "$($result.ScriptName) - $($result.Line)" + $result.Message | Should -Be "$($result.ScriptName) - $($result.Line)" + } + + } + + } + + } + + } + +} \ No newline at end of file diff --git a/tests/PokeAPI.Tests.ps1 b/tests/PokeAPI.Tests.ps1 new file mode 100644 index 0000000..7108dac --- /dev/null +++ b/tests/PokeAPI.Tests.ps1 @@ -0,0 +1,255 @@ +<# +.NOTES + Copyright 1990-2024 Celerium + + NAME: PokeAPI.Tests.ps1 + Type: PowerShell + + AUTHOR: David Schulte + DATE: 2023-04-1 + EMAIL: celerium@Celerium.org + Updated: 2023-09-16 + + TODO: + Huge thank you to LazyWinAdmin, Vexx32, & JeffBrown for their blog posts! + +.SYNOPSIS + Pester tests for the PokeAPI module manifest file. + +.DESCRIPTION + Pester tests for the PokeAPI module manifest file. + +.PARAMETER moduleName + The name of the local module to import + +.PARAMETER Version + The version of the local module to import + +.PARAMETER buildTarget + Which version of the module to run tests against + + Allowed values: + 'built', 'notBuilt' + +.EXAMPLE + Invoke-Pester -Path .\Tests\Private\apiKeys\Get-PokeAPIKey.Tests.ps1 + + Runs a pester test and outputs simple results + +.EXAMPLE + Invoke-Pester -Path .\Tests\Private\apiKeys\Get-PokeAPIKey.Tests.ps1 -Output Detailed + + Runs a pester test and outputs detailed results + +.INPUTS + N\A + +.OUTPUTS + N\A + +.LINK + https://celerium.org + +.LINK + https://vexx32.github.io/2020/07/08/Verify-Module-Help-Pester/ + https://lazywinadmin.com/2016/05/using-pester-to-test-your-comment-based.html + https://jeffbrown.tech/getting-started-with-pester-testing-in-powershell/ + https://github.com/Celerium/PokeAPI-PowerShellWrapper + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.5.0' } + +#Region [ Parameters ] + +#Available in Discovery & Run +[CmdletBinding()] +param ( + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [String]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$version, + + [Parameter(Mandatory=$true)] + [ValidateSet('built','notBuilt')] + [string]$buildTarget +) + +#EndRegion [ Parameters ] + +#Region [ Prerequisites ] + +#Available in Describe and Context but NOT It +#Can be used in [ It ] with [ -TestCases @{ VariableName = $VariableName } ] + BeforeDiscovery{ + + $pester_TestName = (Get-Item -Path $PSCommandPath).Name + $commandName = $pester_TestName -replace '.Tests.ps1','' + + } + +#Available inside It but NOT Describe or Context + BeforeAll { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + switch ($buildTarget){ + 'built' { $modulePath = Join-Path -Path $rootPath -ChildPath "\build\$moduleName\$version" } + 'notBuilt' { $modulePath = Join-Path -Path $rootPath -ChildPath "$moduleName" } + } + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + $modulePsd1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + $modulePsm1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psm1" + + Import-Module -Name $modulePsd1 -ErrorAction Stop -ErrorVariable moduleError *> $null + + $Module = Get-Module -Name $moduleName | Select-Object * -ExcludeProperty Definition + $moduleFiles = Get-ChildItem -Path $modulePath -File -Recurse + + if ($moduleError){ + $moduleError + exit 1 + } + + } + + AfterAll{ + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + } + +#EndRegion [ Prerequisites ] + +Describe "Testing the [ $buildTarget ] version of [ $moduleName ] with [ $pester_TestName ]" { + + Context "[ $moduleName.psd1 ] general manifest data" { + + It "Manifest [ RootModule ] has valid data" { + $Module.RootModule | Should -Be 'PokeAPI.psm1' + } + + It "Manifest [ ModuleVersion ] has valid data" { + $Module.Version | Should -BeGreaterOrEqual $version + } + + It "Manifest [ GUID ] has valid data" { + $Module.GUID | Should -Be 'd6c6b73e-d0ad-4d09-8a24-a5a05064d26c' + } + + It "Manifest [ Author ] has valid data" { + $Module.Author | Should -Be 'David Schulte' + } + + It "Manifest [ CompanyName ] has valid data" { + $Module.CompanyName | Should -Be 'Celerium' + } + + It "Manifest [ Copyright ] has valid data" { + $Module.Copyright | Should -Be 'https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/LICENSE' + } + + It "Manifest [ Description ] is not empty" { + $Module.Description | Should -Not -BeNullOrEmpty + } + + It "Manifest [ PowerShellVersion ] has valid data" { + $Module.PowerShellVersion | Should -BeGreaterOrEqual '5.0' + } + + It "Manifest [ NestedModules ] has valid data" { + switch ($buildTarget){ + 'built' { ($Module.NestedModules.Name).Count | Should -Be 0 } + 'notBuilt' { ($Module.NestedModules.Name).Count | Should -Be 61 } + } + } + + It "Manifest [ FunctionsToExport ] has valid data" { + ($Module.ExportedCommands).Count | Should -Be 60 + } + + It "Manifest [ CmdletsToExport ] is empty" { + ($Module.ExportedCmdlets).Count | Should -Be 0 + } + + It "Manifest [ VariablesToExport ] is empty" { + ($Module.ExportedVariables).Count | Should -Be 0 + } + + It "Manifest [ AliasesToExport ] has alias" { + switch ($buildTarget){ + 'built' { ($Module.ExportedAliases | Measure-Object).Count | Should -Be 1 } + 'notBuilt' { $Module.ExportedAliases | Should -Not -BeNullOrEmpty } + } + } + + It "Manifest [ Tags ] has valid data" { + $Module.PrivateData.PSData.Tags | Should -Contain 'PokeAPI' + $Module.PrivateData.PSData.Tags | Should -Contain 'Celerium' + ($Module.PrivateData.PSData.Tags).Count | Should -BeGreaterOrEqual 7 + } + + It "Manifest [ LicenseUri ] has valid data" { + $Module.LicenseUri | Should -Be 'https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/LICENSE' + } + + It "Manifest [ ProjectUri ] has valid data" { + $Module.ProjectUri | Should -Be 'https://github.com/Celerium/PokeAPI-PowerShellWrapper' + } + + It "Manifest [ IconUri ] has valid data" { + $Module.IconUri | Should -Be 'https://raw.githubusercontent.com/Celerium/PokeAPI-PowerShellWrapper/main/.github/images/Celerium_PoSHGallery_PokeAPI.png' + } + + It "Manifest [ ReleaseNotes ] has valid data" { + $Module.ReleaseNotes | Should -Be 'https://github.com/Celerium/PokeAPI-PowerShellWrapper/blob/main/README.md' + } + + It "Manifest [ HelpInfoUri ] is not empty" { + $Module.HelpInfoUri | Should -BeNullOrEmpty + } + + } + + Context "[ $moduleName.psd1 ] module import test" { + + It "Module contains only PowerShell files" { + ($moduleFiles | Group-Object Extension).Name.Count | Should -BeLessOrEqual 3 + } + + It "Module files exist" { + $modulePsd1 | Should -Exist + $modulePsm1 | Should -Exist + } + + It "Should pass Test-ModuleManifest" { + $modulePsd1 | Test-ModuleManifest -ErrorAction SilentlyContinue -ErrorVariable error_ModuleManifest + [bool]$error_ModuleManifest | Should -Be $false + } + + It "Should import successfully" { + Import-Module $modulePsd1 -ErrorAction SilentlyContinue -ErrorVariable error_ModuleImport + [bool]$error_ModuleImport | Should -Be $false + } + + } + +} \ No newline at end of file diff --git a/tests/Private/apiCalls/ConvertTo-PokeQueryString.Tests.ps1 b/tests/Private/apiCalls/ConvertTo-PokeQueryString.Tests.ps1 new file mode 100644 index 0000000..0be6aa1 --- /dev/null +++ b/tests/Private/apiCalls/ConvertTo-PokeQueryString.Tests.ps1 @@ -0,0 +1,123 @@ +<# + .SYNOPSIS + Pester tests for the PokeAPI PLACEHOLDER functions + + .DESCRIPTION + Pester tests for the PokeAPI PLACEHOLDER functions + + .PARAMETER moduleName + The name of the local module to import + + .PARAMETER Version + The version of the local module to import + + .PARAMETER buildTarget + Which version of the module to run tests against + + Allowed values: + 'built', 'notBuilt' + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\PLACEHOLDER\Get-PokePlaceholder.Tests.ps1 + + Runs a pester test and outputs simple results + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\PLACEHOLDER\Get-PokePlaceholder.Tests.ps1 -Output Detailed + + Runs a pester test and outputs detailed results + + .INPUTS + N\A + + .OUTPUTS + N\A + + .NOTES + N\A + + .LINK + https://celerium.org + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.5.0' } + +#Region [ Parameters ] + +#Available in Discovery & Run +[CmdletBinding()] +param ( + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [String]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$version, + + [Parameter(Mandatory=$true)] + [ValidateSet('built','notBuilt')] + [string]$buildTarget +) + +#EndRegion [ Parameters ] + +#Region [ Prerequisites ] + +#Available inside It but NOT Describe or Context + BeforeAll { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + switch ($buildTarget){ + 'built' { $modulePath = Join-Path -Path $rootPath -ChildPath "\build\$moduleName\$version" } + 'notBuilt' { $modulePath = Join-Path -Path $rootPath -ChildPath "$moduleName" } + } + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + $modulePsd1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + + Import-Module -Name $modulePsd1 -ErrorAction Stop -ErrorVariable moduleError *> $null + + if ($moduleError){ + $moduleError + exit 1 + } + + } + + AfterAll{ + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + } + + +#EndRegion [ Prerequisites ] + +Describe "Testing [ $commandName ] function with [ $pester_TestName ]" -Tag @('PLACEHOLDER','apiCalls') { + + Context "[ $commandName ] testing function" { + + It "PLACEHOLDER" { + $false | Should -BeTrue + } + + } + +} \ No newline at end of file diff --git a/tests/Private/apiCalls/Invoke-PokeRequest.Tests.ps1 b/tests/Private/apiCalls/Invoke-PokeRequest.Tests.ps1 new file mode 100644 index 0000000..f1e70a4 --- /dev/null +++ b/tests/Private/apiCalls/Invoke-PokeRequest.Tests.ps1 @@ -0,0 +1,133 @@ +<# + .SYNOPSIS + Pester tests for the PokeAPI PLACEHOLDER functions + + .DESCRIPTION + Pester tests for the PokeAPI PLACEHOLDER functions + + .PARAMETER moduleName + The name of the local module to import + + .PARAMETER Version + The version of the local module to import + + .PARAMETER buildTarget + Which version of the module to run tests against + + Allowed values: + 'built', 'notBuilt' + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\PLACEHOLDER\Get-PokePlaceholder.Tests.ps1 + + Runs a pester test and outputs simple results + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\PLACEHOLDER\Get-PokePlaceholder.Tests.ps1 -Output Detailed + + Runs a pester test and outputs detailed results + + .INPUTS + N\A + + .OUTPUTS + N\A + + .NOTES + N\A + + .LINK + https://celerium.org + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.5.0' } + +#Region [ Parameters ] + +#Available in Discovery & Run +[CmdletBinding()] +param ( + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [String]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$version, + + [Parameter(Mandatory=$true)] + [ValidateSet('built','notBuilt')] + [string]$buildTarget +) + +#EndRegion [ Parameters ] + +#Region [ Prerequisites ] + +#Available inside It but NOT Describe or Context + BeforeAll { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + switch ($buildTarget){ + 'built' { $modulePath = Join-Path -Path $rootPath -ChildPath "\build\$moduleName\$version" } + 'notBuilt' { $modulePath = Join-Path -Path $rootPath -ChildPath "$moduleName" } + } + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + $modulePsd1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + + Import-Module -Name $modulePsd1 -ErrorAction Stop -ErrorVariable moduleError *> $null + + if ($moduleError){ + $moduleError + exit 1 + } + + } + + AfterAll{ + + Remove-PokeAPIKey -WarningAction SilentlyContinue + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + } + +#Available in Describe and Context but NOT It +#Can be used in [ It ] with [ -TestCases @{ VariableName = $VariableName } ] + BeforeDiscovery{ + + $pester_TestName = (Get-Item -Path $PSCommandPath).Name + $commandName = $pester_TestName -replace '.Tests.ps1','' + + } + +#EndRegion [ Prerequisites ] + +Describe "Testing [ $commandName ] function with [ $pester_TestName ]" -Tag @('PLACEHOLDER','apiCalls') { + + Context "[ $commandName ] testing function" { + + It "PLACEHOLDER" { + $false | Should -BeTrue + } + + } + +} \ No newline at end of file diff --git a/tests/Private/baseUri/Add-PokeBaseURI.Tests.ps1 b/tests/Private/baseUri/Add-PokeBaseURI.Tests.ps1 new file mode 100644 index 0000000..dfbb8f6 --- /dev/null +++ b/tests/Private/baseUri/Add-PokeBaseURI.Tests.ps1 @@ -0,0 +1,160 @@ +<# + .SYNOPSIS + Pester tests for the PokeAPI baseURI functions + + .DESCRIPTION + Pester tests for the PokeAPI baseURI functions + + .PARAMETER moduleName + The name of the local module to import + + .PARAMETER Version + The version of the local module to import + + .PARAMETER buildTarget + Which version of the module to run tests against + + Allowed values: + 'built', 'notBuilt' + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\baseUri\Get-PokeBaseURI.Tests.ps1 + + Runs a pester test and outputs simple results + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\baseUri\Get-PokeBaseURI.Tests.ps1 -Output Detailed + + Runs a pester test and outputs detailed results + + .INPUTS + N\A + + .OUTPUTS + N\A + + .NOTES + N\A + + .LINK + https://celerium.org + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.5.0' } + +#Region [ Parameters ] + +#Available in Discovery & Run +[CmdletBinding()] +param ( + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [String]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$version, + + [Parameter(Mandatory=$true)] + [ValidateSet('built','notBuilt')] + [string]$buildTarget +) + +#EndRegion [ Parameters ] + +#Region [ Prerequisites ] + +#Available inside It but NOT Describe or Context + BeforeAll { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + switch ($buildTarget){ + 'built' { $modulePath = Join-Path -Path $rootPath -ChildPath "\build\$moduleName\$version" } + 'notBuilt' { $modulePath = Join-Path -Path $rootPath -ChildPath "$moduleName" } + } + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + $modulePsd1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + + Import-Module -Name $modulePsd1 -ErrorAction Stop -ErrorVariable moduleError *> $null + + if ($moduleError){ + $moduleError + exit 1 + } + + } + + AfterAll{ + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + } + +#Available in Describe and Context but NOT It +#Can be used in [ It ] with [ -TestCases @{ VariableName = $VariableName } ] + BeforeDiscovery{ + + $pester_TestName = (Get-Item -Path $PSCommandPath).Name + $commandName = $pester_TestName -replace '.Tests.ps1','' + + } + +#EndRegion [ Prerequisites ] + + +Describe "Testing [ $commandName ] functions with [ $pester_TestName ]" -Tag @('baseUri') { + +Context "[ $commandName ] testing functions" { + + It "[ $commandName ] should have an alias of [ Set-PokeBaseURI ]" { + Get-Alias -Name Set-PokeBaseURI | Should -BeTrue + } + + It "Without parameters should return the default URI" { + Add-PokeBaseURI + Get-PokeBaseURI | Should -Be 'https://pokeapi.co/api/v2' + } + + It "Should accept a value from the pipeline" { + 'https://celerium.org' | Add-PokeBaseURI + Get-PokeBaseURI | Should -Be 'https://celerium.org' + } + + It "With parameter -base_uri should return what was inputted" { + Add-PokeBaseURI -base_uri 'https://celerium.org' + Get-PokeBaseURI | Should -Be 'https://celerium.org' + } + + It "The default URI should NOT contain a trailing forward slash" { + Add-PokeBaseURI + + $URI = Get-PokeBaseURI + ($URI[$URI.Length-1] -eq "/") | Should -BeFalse + } + + It "A custom URI should NOT contain a trailing forward slash" { + Add-PokeBaseURI -base_uri 'https://celerium.org/' + + $URI = Get-PokeBaseURI + ($URI[$URI.Length-1] -eq "/") | Should -BeFalse + } +} + +} \ No newline at end of file diff --git a/tests/Private/baseUri/Get-PokeBaseURI.Tests.ps1 b/tests/Private/baseUri/Get-PokeBaseURI.Tests.ps1 new file mode 100644 index 0000000..c07db1b --- /dev/null +++ b/tests/Private/baseUri/Get-PokeBaseURI.Tests.ps1 @@ -0,0 +1,157 @@ +<# + .SYNOPSIS + Pester tests for the PokeAPI baseURI functions + + .DESCRIPTION + Pester tests for the PokeAPI baseURI functions + + .PARAMETER moduleName + The name of the local module to import + + .PARAMETER Version + The version of the local module to import + + .PARAMETER buildTarget + Which version of the module to run tests against + + Allowed values: + 'built', 'notBuilt' + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\baseUri\Get-PokeBaseURI.Tests.ps1 + + Runs a pester test and outputs simple results + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\baseUri\Get-PokeBaseURI.Tests.ps1 -Output Detailed + + Runs a pester test and outputs detailed results + + .INPUTS + N\A + + .OUTPUTS + N\A + + .NOTES + N\A + + .LINK + https://celerium.org + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.5.0' } + +#Region [ Parameters ] + +#Available in Discovery & Run +[CmdletBinding()] +param ( + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [String]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$version, + + [Parameter(Mandatory=$true)] + [ValidateSet('built','notBuilt')] + [string]$buildTarget +) + +#EndRegion [ Parameters ] + +#Region [ Prerequisites ] + +#Available inside It but NOT Describe or Context + BeforeAll { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + switch ($buildTarget){ + 'built' { $modulePath = Join-Path -Path $rootPath -ChildPath "\build\$moduleName\$version" } + 'notBuilt' { $modulePath = Join-Path -Path $rootPath -ChildPath "$moduleName" } + } + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + $modulePsd1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + + Import-Module -Name $modulePsd1 -ErrorAction Stop -ErrorVariable moduleError *> $null + + if ($moduleError){ + $moduleError + exit 1 + } + + } + + AfterAll{ + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + } + +#Available in Describe and Context but NOT It +#Can be used in [ It ] with [ -TestCases @{ VariableName = $VariableName } ] + BeforeDiscovery{ + + $pester_TestName = (Get-Item -Path $PSCommandPath).Name + $commandName = $pester_TestName -replace '.Tests.ps1','' + + } + +#EndRegion [ Prerequisites ] + +Describe "Testing [ $commandName ] function with [ $pester_TestName ]" -Tag @('baseUri') { + + Context "[ $commandName ] testing function" { + + It "The default URI should be returned" { + Add-PokeBaseURI + Get-PokeBaseURI | Should -Be 'https://pokeapi.co/api/v2' + } + + It "The URI should be a string" { + Add-PokeBaseURI + Get-PokeBaseURI | Should -BeOfType string + } + + It "The default URI should NOT contain a trailing forward slash" { + Add-PokeBaseURI + + $URI = Get-PokeBaseURI + ($URI[$URI.Length-1] -eq "/") | Should -BeFalse + } + + It "A custom URI should NOT contain a trailing forward slash" { + Add-PokeBaseURI -base_uri 'https://celerium.org/' + + $URI = Get-PokeBaseURI + ($URI[$URI.Length-1] -eq "/") | Should -BeFalse + } + + It "If the baseUri is not set a warning should be thrown" { + Remove-PokeBaseURI + Get-PokeBaseURI -WarningAction SilentlyContinue -WarningVariable baseUriWarning + [bool]$baseUriWarning | Should -BeTrue + } + + } + +} \ No newline at end of file diff --git a/tests/Private/baseUri/Remove-PokeBaseURI.Tests.ps1 b/tests/Private/baseUri/Remove-PokeBaseURI.Tests.ps1 new file mode 100644 index 0000000..6e573fa --- /dev/null +++ b/tests/Private/baseUri/Remove-PokeBaseURI.Tests.ps1 @@ -0,0 +1,141 @@ +<# + .SYNOPSIS + Pester tests for the PokeAPI baseURI functions + + .DESCRIPTION + Pester tests for the PokeAPI baseURI functions + + .PARAMETER moduleName + The name of the local module to import + + .PARAMETER Version + The version of the local module to import + + .PARAMETER buildTarget + Which version of the module to run tests against + + Allowed values: + 'built', 'notBuilt' + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\baseUri\Remove-PokeBaseURI.Tests.ps1 + + Runs a pester test and outputs simple results + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\baseUri\Remove-PokeBaseURI.Tests.ps1 -Output Detailed + + Runs a pester test and outputs detailed results + + .INPUTS + N\A + + .OUTPUTS + N\A + + .NOTES + N\A + + .LINK + https://celerium.org + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.5.0' } + +#Region [ Parameters ] + +#Available in Discovery & Run +[CmdletBinding()] +param ( + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [String]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$version, + + [Parameter(Mandatory=$true)] + [ValidateSet('built','notBuilt')] + [string]$buildTarget +) + +#EndRegion [ Parameters ] + +#Region [ Prerequisites ] + +#Available inside It but NOT Describe or Context + BeforeAll { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + switch ($buildTarget){ + 'built' { $modulePath = Join-Path -Path $rootPath -ChildPath "\build\$moduleName\$version" } + 'notBuilt' { $modulePath = Join-Path -Path $rootPath -ChildPath "$moduleName" } + } + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + $modulePsd1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + + Import-Module -Name $modulePsd1 -ErrorAction Stop -ErrorVariable moduleError *> $null + + if ($moduleError){ + $moduleError + exit 1 + } + + } + + AfterAll{ + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + } + + +#Available in Describe and Context but NOT It +#Can be used in [ It ] with [ -TestCases @{ VariableName = $VariableName } ] + BeforeDiscovery{ + + $pester_TestName = (Get-Item -Path $PSCommandPath).Name + $commandName = $pester_TestName -replace '.Tests.ps1','' + + } + +#EndRegion [ Prerequisites ] + +Describe "Testing [ $commandName ] function with [ $pester_TestName ]" -Tag @('baseUri') { + + Context "[ $commandName ] testing function" { + + It "The baseUri variable should not longer exist" { + Add-PokeBaseURI + Remove-PokeBaseURI + $Poke_Base_URI | Should -BeNullOrEmpty + } + + It "If the baseUri is already gone a warning should be thrown" { + Add-PokeBaseURI + Remove-PokeBaseURI + Remove-PokeBaseURI -WarningAction SilentlyContinue -WarningVariable baseUriWarning + [bool]$baseUriWarning | Should -BeTrue + } + + } + +} \ No newline at end of file diff --git a/tests/Private/moduleSettings/Export-PokeModuleSettings.Tests.ps1 b/tests/Private/moduleSettings/Export-PokeModuleSettings.Tests.ps1 new file mode 100644 index 0000000..959ee34 --- /dev/null +++ b/tests/Private/moduleSettings/Export-PokeModuleSettings.Tests.ps1 @@ -0,0 +1,161 @@ +<# + .SYNOPSIS + Pester tests for the PokeAPI ModuleSettings functions + + .DESCRIPTION + Pester tests for the PokeAPI ModuleSettings functions + + .PARAMETER moduleName + The name of the local module to import + + .PARAMETER Version + The version of the local module to import + + .PARAMETER buildTarget + Which version of the module to run tests against + + Allowed values: + 'built', 'notBuilt' + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\ModuleSettings\Export-PokeModuleSettings.Tests.ps1 + + Runs a pester test and outputs simple results + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\ModuleSettings\Export-PokeModuleSettings.Tests.ps1 -Output Detailed + + Runs a pester test and outputs detailed results + + .INPUTS + N\A + + .OUTPUTS + N\A + + .NOTES + N\A + + .LINK + https://celerium.org + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.5.0' } + +#Region [ Parameters ] + +#Available in Discovery & Run +[CmdletBinding()] +param ( + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [String]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$version, + + [Parameter(Mandatory=$true)] + [ValidateSet('built','notBuilt')] + [string]$buildTarget +) + +#EndRegion [ Parameters ] + +#Region [ Prerequisites ] + +#Available inside It but NOT Describe or Context + BeforeAll { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + switch ($buildTarget){ + 'built' { $modulePath = Join-Path -Path $rootPath -ChildPath "\build\$moduleName\$version" } + 'notBuilt' { $modulePath = Join-Path -Path $rootPath -ChildPath "$moduleName" } + } + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + $modulePsd1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $exportPath = $(Join-Path -Path $home -ChildPath "PokeAPI_Test") + } + else{ + $exportPath = $(Join-Path -Path $home -ChildPath ".PokeAPI_Test") + } + + Import-Module -Name $modulePsd1 -ErrorAction Stop -ErrorVariable moduleError *> $null + + if ($moduleError){ + $moduleError + exit 1 + } + + } + + AfterAll{ + + Remove-PokeModuleSettings -PokeConfPath $exportPath + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + } + +#Available in Describe and Context but NOT It +#Can be used in [ It ] with [ -TestCases @{ VariableName = $VariableName } ] + BeforeDiscovery{ + + $pester_TestName = (Get-Item -Path $PSCommandPath).Name + $commandName = $pester_TestName -replace '.Tests.ps1','' + + } + +#EndRegion [ Prerequisites ] + +Describe "Testing [ $commandName ] function with [ $pester_TestName ]" -Tag @('moduleSettings') { + + Context "[ $commandName ] testing function" { + + It "Should export successfully" { + Add-PokeBaseUri + + Export-PokeModuleSettings -PokeConfPath $exportPath -ErrorVariable moduleSettingsError -WarningAction SilentlyContinue + + $moduleSettingsError | Should -BeNullOrEmpty + } + + It "Configuration directory should be hidden" { + Add-PokeBaseUri + + Export-PokeModuleSettings -PokeConfPath $exportPath -ErrorVariable moduleSettingsError -WarningAction SilentlyContinue + + (Get-Item -Path $exportPath -Force).Attributes | Should -BeLike "*Hidden*" + } + + It "Configuration file should contain required values" { + Add-PokeBaseUri + + Export-PokeModuleSettings -PokeConfPath $exportPath -ErrorVariable moduleSettingsError -WarningAction SilentlyContinue + + $configFile = Import-LocalizedData -BaseDirectory $exportPath -FileName "config.psd1" + $configFile.Count | Should -BeGreaterOrEqual 1 + $configFile.Poke_Base_URI | Should -Not -BeNullOrEmpty + } + + } + +} \ No newline at end of file diff --git a/tests/Private/moduleSettings/Get-PokeModuleSettings.Tests.ps1 b/tests/Private/moduleSettings/Get-PokeModuleSettings.Tests.ps1 new file mode 100644 index 0000000..50eb803 --- /dev/null +++ b/tests/Private/moduleSettings/Get-PokeModuleSettings.Tests.ps1 @@ -0,0 +1,153 @@ +<# + .SYNOPSIS + Pester tests for the PokeAPI ModuleSettings functions + + .DESCRIPTION + Pester tests for the PokeAPI ModuleSettings functions + + .PARAMETER moduleName + The name of the local module to import + + .PARAMETER Version + The version of the local module to import + + .PARAMETER buildTarget + Which version of the module to run tests against + + Allowed values: + 'built', 'notBuilt' + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\ModuleSettings\Get-PokeModuleSettings.Tests.ps1 + + Runs a pester test and outputs simple results + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\ModuleSettings\Get-PokeModuleSettings.Tests.ps1 -Output Detailed + + Runs a pester test and outputs detailed results + + .INPUTS + N\A + + .OUTPUTS + N\A + + .NOTES + N\A + + .LINK + https://celerium.org + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.5.0' } + +#Region [ Parameters ] + +#Available in Discovery & Run +[CmdletBinding()] +param ( + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [String]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$version, + + [Parameter(Mandatory=$true)] + [ValidateSet('built','notBuilt')] + [string]$buildTarget +) + +#EndRegion [ Parameters ] + +#Region [ Prerequisites ] + +#Available inside It but NOT Describe or Context + BeforeAll { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + switch ($buildTarget){ + 'built' { $modulePath = Join-Path -Path $rootPath -ChildPath "\build\$moduleName\$version" } + 'notBuilt' { $modulePath = Join-Path -Path $rootPath -ChildPath "$moduleName" } + } + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + $modulePsd1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $exportPath = $(Join-Path -Path $home -ChildPath "PokeAPI_Test") + } + else{ + $exportPath = $(Join-Path -Path $home -ChildPath ".PokeAPI_Test") + } + + Import-Module -Name $modulePsd1 -ErrorAction Stop -ErrorVariable moduleError *> $null + + if ($moduleError){ + $moduleError + exit 1 + } + + } + + AfterAll{ + + Remove-PokeModuleSettings -PokeConfPath $exportPath + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + } + +#Available in Describe and Context but NOT It +#Can be used in [ It ] with [ -TestCases @{ VariableName = $VariableName } ] + BeforeDiscovery{ + + $pester_TestName = (Get-Item -Path $PSCommandPath).Name + $commandName = $pester_TestName -replace '.Tests.ps1','' + + } + +#EndRegion [ Prerequisites ] + +Describe "Testing [ $commandName ] function with [ $pester_TestName ]" -Tag @('moduleSettings') { + + Context "[ $commandName ] testing function" { + + It "Configuration directory should be hidden" { + Add-PokeBaseUri + + Export-PokeModuleSettings -PokeConfPath $exportPath -ErrorVariable moduleSettingsError -WarningAction SilentlyContinue + + (Get-Item -Path $exportPath -Force).Attributes | Should -BeLike "*Hidden*" + } + + It "Configuration file should contain required values" { + Add-PokeBaseUri + + Export-PokeModuleSettings -PokeConfPath $exportPath -ErrorVariable moduleSettingsError -WarningAction SilentlyContinue + + $configFile = Get-PokeModuleSettings -PokeConfPath $exportPath + $configFile.Count | Should -BeGreaterOrEqual 1 + $configFile.Poke_Base_URI | Should -Not -BeNullOrEmpty + } + + } + +} \ No newline at end of file diff --git a/tests/Private/moduleSettings/Import-PokeModuleSettings.Tests.ps1 b/tests/Private/moduleSettings/Import-PokeModuleSettings.Tests.ps1 new file mode 100644 index 0000000..2e5e406 --- /dev/null +++ b/tests/Private/moduleSettings/Import-PokeModuleSettings.Tests.ps1 @@ -0,0 +1,160 @@ +<# + .SYNOPSIS + Pester tests for the PokeAPI ModuleSettings functions + + .DESCRIPTION + Pester tests for the PokeAPI ModuleSettings functions + + .PARAMETER moduleName + The name of the local module to import + + .PARAMETER Version + The version of the local module to import + + .PARAMETER buildTarget + Which version of the module to run tests against + + Allowed values: + 'built', 'notBuilt' + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\ModuleSettings\Get-PokeModuleSettings.Tests.ps1 + + Runs a pester test and outputs simple results + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\ModuleSettings\Get-PokeModuleSettings.Tests.ps1 -Output Detailed + + Runs a pester test and outputs detailed results + + .INPUTS + N\A + + .OUTPUTS + N\A + + .NOTES + N\A + + .LINK + https://celerium.org + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.5.0' } + +#Region [ Parameters ] + +#Available in Discovery & Run +[CmdletBinding()] +param ( + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [String]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$version, + + [Parameter(Mandatory=$true)] + [ValidateSet('built','notBuilt')] + [string]$buildTarget +) + +#EndRegion [ Parameters ] + +#Region [ Prerequisites ] + +#Available inside It but NOT Describe or Context + BeforeAll { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + switch ($buildTarget){ + 'built' { $modulePath = Join-Path -Path $rootPath -ChildPath "\build\$moduleName\$version" } + 'notBuilt' { $modulePath = Join-Path -Path $rootPath -ChildPath "$moduleName" } + } + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + $modulePsd1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + $invalidPath = $(Join-Path -Path $home -ChildPath "invalidApiPath") + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $exportPath = $(Join-Path -Path $home -ChildPath "PokeAPI_Test") + } + else{ + $exportPath = $(Join-Path -Path $home -ChildPath ".PokeAPI_Test") + } + + Import-Module -Name $modulePsd1 -ErrorAction Stop -ErrorVariable moduleError *> $null + + if ($moduleError){ + $moduleError + exit 1 + } + + } + + AfterAll{ + + Remove-PokeModuleSettings -PokeConfPath $exportPath + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + } + +#Available in Describe and Context but NOT It +#Can be used in [ It ] with [ -TestCases @{ VariableName = $VariableName } ] + BeforeDiscovery{ + + $pester_TestName = (Get-Item -Path $PSCommandPath).Name + $commandName = $pester_TestName -replace '.Tests.ps1','' + + } + +#EndRegion [ Prerequisites ] + +Describe "Testing [ $commandName ] function with [ $pester_TestName ]" -Tag @('moduleSettings') { + + Context "[ $commandName ] testing function" { + + It "No configuration should populate baseline variables" { + Import-PokeModuleSettings -PokeConfPath $invalidPath -PokeConfFile 'invalid.psd1' + + (Get-Variable -Name Poke_Base_URI).Value | Should -Be $(Get-PokeBaseURI) + } + + It "Saved configuration session should contain required variables" { + Add-PokeBaseUri + + Export-PokeModuleSettings -PokeConfPath $exportPath -WarningAction SilentlyContinue + Import-PokeModuleSettings -PokeConfPath $exportPath + + (Get-Variable -Name Poke_Base_URI).Value | Should -Not -BeNullOrEmpty + } + + It "Saved configuration session should NOT contain temp variables" { + Add-PokeBaseUri + + Export-PokeModuleSettings -PokeConfPath $exportPath -WarningAction SilentlyContinue + Import-PokeModuleSettings -PokeConfPath $exportPath + + (Get-Variable -Name tmp_config -ErrorAction SilentlyContinue).Value | Should -BeNullOrEmpty + } + + } + +} \ No newline at end of file diff --git a/tests/Private/moduleSettings/Initialize-PokeModuleSettings.Tests.ps1 b/tests/Private/moduleSettings/Initialize-PokeModuleSettings.Tests.ps1 new file mode 100644 index 0000000..9a4bcff --- /dev/null +++ b/tests/Private/moduleSettings/Initialize-PokeModuleSettings.Tests.ps1 @@ -0,0 +1,157 @@ +<# + .SYNOPSIS + Pester tests for the PokeAPI ModuleSettings functions + + .DESCRIPTION + Pester tests for the PokeAPI ModuleSettings functions + + .PARAMETER moduleName + The name of the local module to import + + .PARAMETER Version + The version of the local module to import + + .PARAMETER buildTarget + Which version of the module to run tests against + + Allowed values: + 'built', 'notBuilt' + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\ModuleSettings\Initialize-PokeModuleSettings.Tests.ps1 + + Runs a pester test and outputs simple results + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\ModuleSettings\Initialize-PokeModuleSettings.Tests.ps1 -Output Detailed + + Runs a pester test and outputs detailed results + + .INPUTS + N\A + + .OUTPUTS + N\A + + .NOTES + N\A + + .LINK + https://celerium.org + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.5.0' } + +#Region [ Parameters ] + +#Available in Discovery & Run +[CmdletBinding()] +param ( + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [String]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$version, + + [Parameter(Mandatory=$true)] + [ValidateSet('built','notBuilt')] + [string]$buildTarget +) + +#EndRegion [ Parameters ] + +#Region [ Prerequisites ] + +#Available inside It but NOT Describe or Context + BeforeAll { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + switch ($buildTarget){ + 'built' { $modulePath = Join-Path -Path $rootPath -ChildPath "\build\$moduleName\$version" } + 'notBuilt' { $modulePath = Join-Path -Path $rootPath -ChildPath "$moduleName" } + } + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + $modulePsd1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + $invalidPath = $(Join-Path -Path $home -ChildPath "invalidApiPath") + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $exportPath = $(Join-Path -Path $home -ChildPath "PokeAPI_Test") + } + else{ + $exportPath = $(Join-Path -Path $home -ChildPath ".PokeAPI_Test") + } + + Import-Module -Name $modulePsd1 -ErrorAction Stop -ErrorVariable moduleError *> $null + + if ($moduleError){ + $moduleError + exit 1 + } + + } + + AfterAll{ + + Remove-PokeModuleSettings -PokeConfPath $exportPath + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + } + +#Available in Describe and Context but NOT It +#Can be used in [ It ] with [ -TestCases @{ VariableName = $VariableName } ] + BeforeDiscovery{ + + $pester_TestName = (Get-Item -Path $PSCommandPath).Name + $commandName = $pester_TestName -replace '.Tests.ps1','' + + } + +#EndRegion [ Prerequisites ] + +Describe "Testing [ $commandName ] function with [ $pester_TestName ]" -Tag @('moduleSettings') { + + Context "[ $commandName ] testing function" { + + It "When imported WITHOUT a saved configuration baseline variables should exist" { + Remove-Module -Name $moduleName -Force + Import-Module -Name $modulePsd1 + + Import-PokeModuleSettings -PokeConfPath $invalidPath -PokeConfFile 'invalid.psd1' + + (Get-Variable -Name Poke_Base_URI).Value | Should -Be $(Get-PokeBaseURI) + } + + It "When imported WITh a saved configuration baseline variables should exist" { + Remove-Module -Name $moduleName -Force + Import-Module -Name $modulePsd1 -Force + + Add-PokeBaseUri + Export-PokeModuleSettings -PokeConfPath $exportPath -WarningAction SilentlyContinue + + Import-Module -Name $modulePsd1 -Force + + (Get-Variable -Name Poke_Base_URI).Value | Should -Not -BeNullOrEmpty + } + + } + +} \ No newline at end of file diff --git a/tests/Private/moduleSettings/Remove-PokeModuleSettings.Tests.ps1 b/tests/Private/moduleSettings/Remove-PokeModuleSettings.Tests.ps1 new file mode 100644 index 0000000..552869f --- /dev/null +++ b/tests/Private/moduleSettings/Remove-PokeModuleSettings.Tests.ps1 @@ -0,0 +1,162 @@ +<# + .SYNOPSIS + Pester tests for the PokeAPI ModuleSettings functions + + .DESCRIPTION + Pester tests for the PokeAPI ModuleSettings functions + + .PARAMETER moduleName + The name of the local module to import + + .PARAMETER Version + The version of the local module to import + + .PARAMETER buildTarget + Which version of the module to run tests against + + Allowed values: + 'built', 'notBuilt' + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\ModuleSettings\Remove-PokeModuleSettings.Tests.ps1 + + Runs a pester test and outputs simple results + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\ModuleSettings\Remove-PokeModuleSettings.Tests.ps1 -Output Detailed + + Runs a pester test and outputs detailed results + + .INPUTS + N\A + + .OUTPUTS + N\A + + .NOTES + N\A + + .LINK + https://celerium.org + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.5.0' } + +#Region [ Parameters ] + +#Available in Discovery & Run +[CmdletBinding()] +param ( + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [String]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$version, + + [Parameter(Mandatory=$true)] + [ValidateSet('built','notBuilt')] + [string]$buildTarget +) + +#EndRegion [ Parameters ] + +#Region [ Prerequisites ] + +#Available inside It but NOT Describe or Context + BeforeAll { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + switch ($buildTarget){ + 'built' { $modulePath = Join-Path -Path $rootPath -ChildPath "\build\$moduleName\$version" } + 'notBuilt' { $modulePath = Join-Path -Path $rootPath -ChildPath "$moduleName" } + } + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + $modulePsd1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + $invalidPath = $(Join-Path -Path $home -ChildPath "invalidApiPath") + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $exportPath = $(Join-Path -Path $home -ChildPath "PokeAPI_Test") + } + else{ + $exportPath = $(Join-Path -Path $home -ChildPath ".PokeAPI_Test") + } + + Import-Module -Name $modulePsd1 -ErrorAction Stop -ErrorVariable moduleError *> $null + + if ($moduleError){ + $moduleError + exit 1 + } + + } + + AfterAll{ + + Remove-PokeModuleSettings -PokeConfPath $exportPath -WarningAction SilentlyContinue + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + } + +#Available in Describe and Context but NOT It +#Can be used in [ It ] with [ -TestCases @{ VariableName = $VariableName } ] + BeforeDiscovery{ + + $pester_TestName = (Get-Item -Path $PSCommandPath).Name + $commandName = $pester_TestName -replace '.Tests.ps1','' + + } + +#EndRegion [ Prerequisites ] + +Describe "Testing [ $commandName ] function with [ $pester_TestName ]" -Tag @('moduleSettings') { + + Context "[ $commandName ] testing function" { + + It "No configuration should throw a warning" { + Remove-PokeModuleSettings -PokeConfPath $invalidPath -WarningAction SilentlyContinue -WarningVariable moduleSettingsWarning + + [bool]$moduleSettingsWarning | Should -BeTrue + } + + It "Saved configuration should be removed" { + Add-PokeBaseUri + + Export-PokeModuleSettings -PokeConfPath $exportPath -WarningAction SilentlyContinue + Remove-PokeModuleSettings -PokeConfPath $exportPath + + Test-Path -Path $exportPath | Should -BeFalse + [bool](Get-Variable -Name Poke_Base_URI -ErrorAction SilentlyContinue) | Should -BeTrue + } + + It "Saved configuration & variables should be removed" { + Add-PokeBaseUri + + Export-PokeModuleSettings -PokeConfPath $exportPath -WarningAction SilentlyContinue + Remove-PokeModuleSettings -PokeConfPath $exportPath -andVariables + + Test-Path -Path $exportPath | Should -BeFalse + [bool](Get-Variable -Name Poke_Base_URI -ErrorAction SilentlyContinue) | Should -BeFalse + } + + } + +} \ No newline at end of file diff --git a/tests/Public/BCDR/Get-PokeAgent.Tests.ps1 b/tests/Public/BCDR/Get-PokeAgent.Tests.ps1 new file mode 100644 index 0000000..c89f0ca --- /dev/null +++ b/tests/Public/BCDR/Get-PokeAgent.Tests.ps1 @@ -0,0 +1,123 @@ +<# + .SYNOPSIS + Pester tests for the PokeAPI PLACEHOLDER functions + + .DESCRIPTION + Pester tests for the PokeAPI PLACEHOLDER functions + + .PARAMETER moduleName + The name of the local module to import + + .PARAMETER Version + The version of the local module to import + + .PARAMETER buildTarget + Which version of the module to run tests against + + Allowed values: + 'built', 'notBuilt' + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\PLACEHOLDER\Get-PokePlaceholder.Tests.ps1 + + Runs a pester test and outputs simple results + + .EXAMPLE + Invoke-Pester -Path .\Tests\Private\PLACEHOLDER\Get-PokePlaceholder.Tests.ps1 -Output Detailed + + Runs a pester test and outputs detailed results + + .INPUTS + N\A + + .OUTPUTS + N\A + + .NOTES + N\A + + .LINK + https://celerium.org + +#> + +<############################################################################################ + Code +############################################################################################> +#Requires -Version 5.1 +#Requires -Modules @{ ModuleName='Pester'; ModuleVersion='5.5.0' } + +#Region [ Parameters ] + +#Available in Discovery & Run +[CmdletBinding()] +param ( + [Parameter(Mandatory = $false)] + [ValidateNotNullOrEmpty()] + [String]$moduleName = 'PokeAPI', + + [Parameter(Mandatory=$true)] + [ValidateNotNullOrEmpty()] + [String]$version, + + [Parameter(Mandatory=$true)] + [ValidateSet('built','notBuilt')] + [string]$buildTarget +) + +#EndRegion [ Parameters ] + +#Region [ Prerequisites ] + +#Available inside It but NOT Describe or Context + BeforeAll { + + if ($IsWindows -or $PSEdition -eq 'Desktop') { + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('\tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + else{ + $rootPath = "$( $PSCommandPath.Substring(0, $PSCommandPath.IndexOf('/tests', [System.StringComparison]::OrdinalIgnoreCase)) )" + } + + switch ($buildTarget){ + 'built' { $modulePath = Join-Path -Path $rootPath -ChildPath "\build\$moduleName\$version" } + 'notBuilt' { $modulePath = Join-Path -Path $rootPath -ChildPath "$moduleName" } + } + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + $modulePsd1 = Join-Path -Path $modulePath -ChildPath "$moduleName.psd1" + + Import-Module -Name $modulePsd1 -ErrorAction Stop -ErrorVariable moduleError *> $null + + if ($moduleError){ + $moduleError + exit 1 + } + + } + + AfterAll{ + + if (Get-Module -Name $moduleName){ + Remove-Module -Name $moduleName -Force + } + + } + + +#EndRegion [ Prerequisites ] + +Describe "Testing [ $commandName ] function with [ $pester_TestName ]" -Tag @('PLACEHOLDER') { + + Context "[ $commandName ] testing function" { + + It "PLACEHOLDER" { + $false | Should -BeTrue + } + + } + +} \ No newline at end of file
InActiveInActive