@pipedream/wordpress_org 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,32 +1,11 @@
1
1
  # Overview
2
2
 
3
- WordPress API can help you create a variety of different projects with greater
4
- efficiency and functionality. Whether it’s developing and creating a custom
5
- WordPress site, creating an API for a product, or developing a plugin for a
6
- program, the WordPress API offers more possibilities than ever to customize and
7
- enhance your online experience. Here are a few examples of things you can build
8
- using the WordPress API:
3
+ The WordPress.org API offers a wide range of capabilities for content management, theme and plugin information, and community engagement. With Pipedream, you can harness this API to create automated workflows that react to events in WordPress, sync content across platforms, or even manage your site's appearance and functionality programmatically. Whether you're looking to streamline your publishing process, enhance user interaction, or keep everything in sync, the WordPress.org API on Pipedream offers a powerful toolset to craft custom solutions.
9
4
 
10
- - Custom WordPress Sites: With WordPress API, you can create specialized and
11
- customized sites that fit your exact needs and vision. From e-commerce stores
12
- to magazine websites and anything else imaginable, WordPress API can help you
13
- create and customize a website that’s tailored to your exact needs.
14
- - Product API: If you’re a developer and you have products that require an API,
15
- WordPress API can help you easily create one. You can create a custom API
16
- that helps you manage your products and make them available to other
17
- applications and websites.
18
- - Plugin Creation: If you need a plugin for something you’re developing, the
19
- WordPress API can help you create something tailored to your exact needs.
20
- From custom shortcodes to mini programs and full-fledged plugins, the
21
- WordPress API has what you need.
22
- - Widgets: Widgets are small pieces of code that you can use on your website to
23
- display different types of content. You can use the WordPress API to create
24
- custom widgets that help you display plugins, videos, images, and more.
25
- - Custom Social Network Platforms: The WordPress API offers more possibilities
26
- than ever to create custom social network platforms. With access to the API,
27
- you can create specialized networks for your website, unfettered by
28
- third-party restrictions.
29
- - Mobile Applications:Do you need to create a mobile application that interacts
30
- with your website? The WordPress API can provide the tools and features you
31
- need to create a smooth and seamless integration between your website and
32
- your app.
5
+ # Example Use Cases
6
+
7
+ - **Automated Content Syndication**: Publish new WordPress posts automatically to social media platforms like Twitter or Facebook. Whenever you push a new post, Pipedream can capture this event and send out tweets or posts with links back to your article, driving traffic and engagement.
8
+
9
+ - **Dynamic Content Updates**: Update content across multiple WordPress sites in response to a single trigger. For instance, when you update a post on your main site, Pipedream can propagate these changes to other WordPress sites you manage, ensuring content consistency.
10
+
11
+ - **Scheduled Theme Changes**: Swap WordPress themes based on time or specific triggers, such as holidays or promotional events. With Pipedream, you can schedule these changes in advance, so your site reflects the right mood or branding at just the right time.
@@ -1,19 +1,19 @@
1
1
  import wordpress from "../../wordpress_org.app.mjs";
2
2
  import utils from "../../common/utils.mjs";
3
- import fs from "fs";
3
+ import { getFileStream } from "@pipedream/platform";
4
4
 
5
5
  export default {
6
6
  key: "wordpress_org-upload-media",
7
7
  name: "Upload Media",
8
8
  description: "Upload a media item to your WordPress media library. Returns a media ID to be used in creating or updating posts.[See the documentation](https://www.npmjs.com/package/wpapi#uploading-media)",
9
- version: "0.0.1",
9
+ version: "0.0.2",
10
10
  type: "action",
11
11
  props: {
12
12
  wordpress,
13
13
  filePath: {
14
14
  type: "string",
15
- label: "File Path",
16
- description: "The path to a document file in the `/tmp` directory. [See the documentation on working with files](https://pipedream.com/docs/code/nodejs/working-with-files/#the-tmp-directory).",
15
+ label: "File Path or URL",
16
+ description: "Provide either a file URL or a path to a file in the /tmp directory (for example, /tmp/myFile.pdf).",
17
17
  },
18
18
  title: {
19
19
  propDefinition: [
@@ -39,7 +39,7 @@ export default {
39
39
  },
40
40
  },
41
41
  async run({ $ }) {
42
- const content = fs.createReadStream(utils.getFilePath(this.filePath));
42
+ const content = await getFileStream(this.filePath);
43
43
 
44
44
  const params = utils.cleanObj({
45
45
  title: this.title,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pipedream/wordpress_org",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Pipedream Wordpress.org Components",
5
5
  "main": "wordpress_org.app.mjs",
6
6
  "keywords": [
@@ -10,6 +10,7 @@
10
10
  "homepage": "https://pipedream.com/apps/wordpress_org",
11
11
  "author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
12
12
  "dependencies": {
13
+ "@pipedream/platform": "^3.1.0",
13
14
  "lodash.pickby": "^4.6.0",
14
15
  "wpapi": "^1.2.2"
15
16
  },