Skip to content

Commit

Permalink
update some typedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
zisismaras committed Aug 10, 2019
1 parent bb0ea6e commit 51e7d95
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
6 changes: 4 additions & 2 deletions src/prelude/actions/yield.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {IPipeProcClient} from "pipeproc";
export interface IYieldActions {
/**
* Yields extracted data from a scraper to the next step of the pipeline.
* Learn more about yield in this example: https://ayakashi.io/guide/building-a-complete-scraping-project.html
* Learn more about yield here: https://ayakashi.io/docs/going_deeper/yielding-data.html
* ```js
ayakashi.select("myDivProp").where({id: {eq: "myDiv"}});
const result = await ayakashi.extract("myDivProp");
Expand All @@ -17,7 +17,7 @@ await ayakashi.yield(result);
/**
* Yields multiple extractions individually in a single (atomic) operation.
* The next step of the pipeline will run for each extraction.
* Learn more about yield in this example: https://ayakashi.io/guide/building-a-complete-scraping-project.html
* Learn more about yieldEach here: https://ayakashi.io/docs/going_deeper/yielding-data.html
* ```js
await ayakashi.yieldEach(extractedLinks);
//is kinda like this
Expand All @@ -31,11 +31,13 @@ for (const link of extractedLinks) {
/**
* Recursively re-run the scraper by yielding the extracted data to itself.
* The data will be available in the input object.
* Learn more about recursiveYield here: https://ayakashi.io/docs/going_deeper/yielding-data.html
*/
recursiveYield: (extracted: object | Promise<object>) => Promise<void>;
/**
* Recursively re-run the scraper by yielding multiple extractions individually in a single (atomic) operation.
* The data will be available in the input object.
* Learn more about recursiveYieldEach here: https://ayakashi.io/docs/going_deeper/yielding-data.html
*/
recursiveYieldEach: (extracted: object[] | Promise<object[]>) => Promise<void>;
}
Expand Down
23 changes: 12 additions & 11 deletions src/prelude/query/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface IDomProp {
__trackMissingChildren: boolean;
/**
* Defines the query of a new prop.
* Learn more here: http://ayakashi.io/docs/guide/querying-with-domql.html
* Learn more here: https://ayakashi.io/docs/guide/querying-with-domql.html
* ```js
ayakashi
.select("myProp")
Expand All @@ -32,7 +32,7 @@ ayakashi
where: (q: Where) => this;
/**
* Limits the prop matches.
* Learn more here: http://ayakashi.io/docs/guide/querying-with-domql.html#limit-skip-and-order
* Learn more here: https://ayakashi.io/docs/guide/querying-with-domql.html#limit-skip-and-order
* ```js
ayakashi
.select("myProp")
Expand All @@ -47,7 +47,7 @@ ayakashi
limit: (n: number) => this;
/**
* Skips some of the prop matches.
* Learn more here: http://ayakashi.io/docs/guide/querying-with-domql.html#limit-skip-and-order
* Learn more here: https://ayakashi.io/docs/guide/querying-with-domql.html#limit-skip-and-order
* ```js
ayakashi
.select("myProp")
Expand All @@ -62,7 +62,7 @@ ayakashi
skip: (n: number) => this;
/**
* Changes the order of how a prop's matches are retrieved.
* Learn more here: http://ayakashi.io/docs/guide/querying-with-domql.html#limit-skip-and-order
* Learn more here: https://ayakashi.io/docs/guide/querying-with-domql.html#limit-skip-and-order
* ```js
ayakashi
.select("myProp")
Expand All @@ -77,7 +77,7 @@ ayakashi
order: (ord: "asc" | "desc") => this;
/**
* Limits the new prop's matches to child elements of an existing prop.
* Learn more here: http://ayakashi.io/docs/guide/querying-with-domql.html#child-queries
* Learn more here: https://ayakashi.io/docs/guide/querying-with-domql.html#child-queries
* ```js
ayakashi
.select("myProp")
Expand All @@ -92,7 +92,7 @@ ayakashi
from: (propId: string | string[] | IDomProp | IDomProp[]) => this;
/**
* Manually triggers a prop.
* Learn more here: http://ayakashi.io/docs/going_deeper/re-evaluating-props.html
* Learn more here: https://ayakashi.io/docs/going_deeper/re-evaluating-props.html
* ```js
const myProp = ayakashi
.select("myProp")
Expand All @@ -107,7 +107,7 @@ await myProp.trigger();
trigger: (triggerOptions?: {force?: boolean, showNoMatchesWarning?: boolean}) => Promise<number>;
/**
* Makes the prop to ignore its cached elements on its next trigger and be re-evaluated.
* Learn more here: http://ayakashi.io/docs/going_deeper/re-evaluating-props.html
* Learn more here: https://ayakashi.io/docs/going_deeper/re-evaluating-props.html
* ```js
const mainSection = ayakashi
.select()
Expand All @@ -132,7 +132,7 @@ mainSection.update();
update: () => this;
/**
* Defines a new child query with a limit of 1 match.
* Learn more here: http://ayakashi.io/docs/guide/querying-with-domql.html#child-queries
* Learn more here: https://ayakashi.io/docs/guide/querying-with-domql.html#child-queries
* ```js
ayakashi
.select("myParentProp")
Expand All @@ -152,7 +152,7 @@ ayakashi
selectChild: (childPropId?: string) => IDomProp;
/**
* Defines a new child query with a limit of 1 match.
* Learn more here: http://ayakashi.io/docs/guide/querying-with-domql.html#child-queries
* Learn more here: https://ayakashi.io/docs/guide/querying-with-domql.html#child-queries
* Alias of selectChild()
* ```js
ayakashi
Expand All @@ -173,7 +173,7 @@ ayakashi
selectFirstChild: (childPropId?: string) => IDomProp;
/**
* Defines a new child query with a limit of 1 match in and a descending ordering.
* Learn more here: http://ayakashi.io/docs/guide/querying-with-domql.html#child-queries
* Learn more here: https://ayakashi.io/docs/guide/querying-with-domql.html#child-queries
* Alias of selectChild()
* ```js
ayakashi
Expand All @@ -194,7 +194,7 @@ ayakashi
selectLastChild: (childPropId?: string) => IDomProp;
/**
* Defines a new child query with no match limit.
* Learn more here: http://ayakashi.io/docs/guide/querying-with-domql.html#child-queries
* Learn more here: https://ayakashi.io/docs/guide/querying-with-domql.html#child-queries
* Alias of selectChild()
* ```js
ayakashi
Expand Down Expand Up @@ -235,6 +235,7 @@ while (await next.hasMatches()) {
/**
* Adds a child match placeholder if a child does not exist in a collection of parents.
* Can be used to preserve proper ordering when extracting children that might sometimes not exist.
* Learn more here: https://ayakashi.io/docs/guide/querying-with-domql.html#tracking-missing-children
* ```js
// for the following html
// <div class="container"><a href="http://example.com">link1</a></div>
Expand Down

0 comments on commit 51e7d95

Please sign in to comment.