pyemoncms 0.0.1__tar.gz → 0.0.3__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyemoncms
3
- Version: 0.0.1
3
+ Version: 0.0.3
4
4
  Summary: A python library to interrogate emoncms API
5
5
  Home-page: https://github.com/Open-Building-Management/pyemoncms
6
6
  Author: Alexandre CUER
@@ -83,7 +83,10 @@ class EmoncmsClient:
83
83
  return feed_data[MESSAGE_KEY]
84
84
  return None
85
85
 
86
- async def async_get_feed_fields(self, feed_id: int) -> list[str, Any]:
87
- """Get all feed fields."""
86
+ async def async_get_feed_fields(self, feed_id: int) -> list[str, Any] | None:
87
+ """Get all fields for a single feed."""
88
88
  params = {"apikey": self.api_key, "id": feed_id}
89
- return await self.async_request("/feed/aget.json", params=params)
89
+ feed_data = await self.async_request("/feed/aget.json", params=params)
90
+ if feed_data[SUCCESS_KEY]:
91
+ return feed_data[MESSAGE_KEY]
92
+ return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyemoncms
3
- Version: 0.0.1
3
+ Version: 0.0.3
4
4
  Summary: A python library to interrogate emoncms API
5
5
  Home-page: https://github.com/Open-Building-Management/pyemoncms
6
6
  Author: Alexandre CUER
@@ -2,10 +2,10 @@ LICENSE
2
2
  README.md
3
3
  pyproject.toml
4
4
  setup.py
5
+ pyemoncms/__init__.py
6
+ pyemoncms/emoncms_client.py
5
7
  pyemoncms.egg-info/PKG-INFO
6
8
  pyemoncms.egg-info/SOURCES.txt
7
9
  pyemoncms.egg-info/dependency_links.txt
8
10
  pyemoncms.egg-info/requires.txt
9
- pyemoncms.egg-info/top_level.txt
10
- src/__init__.py
11
- src/emoncms_client.py
11
+ pyemoncms.egg-info/top_level.txt
@@ -0,0 +1 @@
1
+ pyemoncms
@@ -6,7 +6,7 @@ with open("README.md", "r", encoding="utf-8") as fh:
6
6
 
7
7
  setuptools.setup(
8
8
  name="pyemoncms",
9
- version="0.0.1",
9
+ version="0.0.3",
10
10
  author="Alexandre CUER",
11
11
  author_email="alexandre.cuer@wanadoo.fr",
12
12
  description="A python library to interrogate emoncms API",
@@ -1 +0,0 @@
1
- src
File without changes
File without changes
File without changes
File without changes