Skip to content

Commit

Permalink
Version 0.4 for release
Browse files Browse the repository at this point in the history
  • Loading branch information
phillwiggins committed Jan 7, 2019
1 parent cf98591 commit ddc25c6
Show file tree
Hide file tree
Showing 31 changed files with 398 additions and 395 deletions.
439 changes: 213 additions & 226 deletions .idea/workspace.xml

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.0.4

Added description

## 0.0.3

Added more cloud functions
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Want to get involved? Join our Slack channel and help out! (http://flutter-parse
To install, either add to your pubspec.yaml
```
dependencies:
parse_server_sdk: ^0.0.2
parse_server_sdk: ^0.0.4
```
or clone this repository and add to your project. As this is an early development with multiple contributors, it is probably best to download/clone and keep updating as an when a new feature is added.

Expand Down
2 changes: 1 addition & 1 deletion example/lib/diet_plan.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'dart:core';

import 'package:parse_server_sdk/objects/parse_object.dart';
import 'package:parse_server_sdk/parse.dart';

class DietPlan extends ParseObject {
DietPlan() : super(DIET_PLAN);
Expand Down
4 changes: 0 additions & 4 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_plugin_example/application_constants.dart';
import 'package:flutter_plugin_example/diet_plan.dart';
import 'package:parse_server_sdk/network/parse_query.dart';
import 'package:parse_server_sdk/objects/parse_function.dart';
import 'package:parse_server_sdk/objects/parse_object.dart';
import 'package:parse_server_sdk/objects/parse_user.dart';
import 'package:parse_server_sdk/parse.dart';

void main() => runApp(new MyApp());
Expand Down
11 changes: 0 additions & 11 deletions lib/enums/parse_enum_function_call.dart

This file was deleted.

26 changes: 0 additions & 26 deletions lib/enums/parse_enum_object_call.dart

This file was deleted.

32 changes: 0 additions & 32 deletions lib/enums/parse_enum_user_call.dart

This file was deleted.

33 changes: 31 additions & 2 deletions lib/parse.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
import 'package:parse_server_sdk/data/parse_data_server.dart';
import 'package:parse_server_sdk/network/parse_http_client.dart';
library flutter_parse_sdk;

import 'dart:async';
import 'dart:convert';
import 'dart:io';

import 'package:http/http.dart';
import 'package:intl/intl.dart';
import 'package:meta/meta.dart';
import 'package:web_socket_channel/io.dart';

part 'src/base/parse_constants.dart';
part 'src/data/parse_data.dart';
part 'src/data/parse_data_objects.dart';
part 'src/data/parse_data_server.dart';
part 'src/data/parse_data_user.dart';
part 'src/enums/parse_enum_function_call.dart';
part 'src/enums/parse_enum_object_call.dart';
part 'src/enums/parse_enum_user_call.dart';
part 'src/network/parse_http_client.dart';
part 'src/network/parse_livequery.dart';
part 'src/network/parse_query.dart';
part 'src/objects/parse_base.dart';
part 'src/objects/parse_exception.dart';
part 'src/objects/parse_function.dart';
part 'src/objects/parse_object.dart';
part 'src/objects/parse_response.dart';
part 'src/objects/parse_user.dart';

part 'src/utils/parse_utils_date.dart';
part 'src/utils/parse_utils_objects.dart';

class Parse {
ParseDataServer data;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
part of flutter_parse_sdk;

class ParseConstants {

static const String PARSE_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm";
Expand Down
2 changes: 2 additions & 0 deletions lib/data/parse_data.dart → lib/src/data/parse_data.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
part of flutter_parse_sdk;

class ParseData {
static ParseData _instance;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:parse_server_sdk/objects/parse_object.dart';
part of flutter_parse_sdk;

class ParseDataObjects {
static ParseDataObjects _instance;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
part of flutter_parse_sdk;

class ParseDataServer {
static ParseDataServer _instance;
static ParseDataServer get instance => _instance;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import 'package:parse_server_sdk/base/parse_constants.dart';
import 'package:parse_server_sdk/objects/parse_base.dart';
import 'package:parse_server_sdk/utils/parse_utils_date.dart';
part of flutter_parse_sdk;

class User extends ParseBase {
static User _instance;
Expand Down
14 changes: 14 additions & 0 deletions lib/src/enums/parse_enum_function_call.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
part of flutter_parse_sdk;

enum ParseApiFunctionCallType { execute }

class ParseApiFunctionCallTypeUtil {
static getEnumValue(ParseApiFunctionCallType type) {
switch (type) {
case ParseApiFunctionCallType.execute:
{
return 'execure';
}
}
}
}
34 changes: 34 additions & 0 deletions lib/src/enums/parse_enum_object_call.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
part of flutter_parse_sdk;

enum ParseApiObjectCallType { get, getAll, create, save, query, delete }

class ParseApiObjectCallTypeUtil {
static getEnumValue(ParseApiObjectCallType type) {
switch (type) {
case ParseApiObjectCallType.get:
{
return 'get';
}
case ParseApiObjectCallType.getAll:
{
return 'getAll';
}
case ParseApiObjectCallType.create:
{
return 'create';
}
case ParseApiObjectCallType.save:
{
return 'save';
}
case ParseApiObjectCallType.query:
{
return 'query';
}
case ParseApiObjectCallType.delete:
{
return 'delete';
}
}
}
}
51 changes: 51 additions & 0 deletions lib/src/enums/parse_enum_user_call.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
part of flutter_parse_sdk;

enum ParseApiUserCallType {
currentUser,
signUp,
login,
verificationEmailRequest,
requestPasswordReset,
save,
destroy,
all
}

class ParseApiUserCallTypeUtils {
static getEnumValue(ParseApiUserCallType type) {
switch (type) {
case ParseApiUserCallType.currentUser:
{
return 'currentUser';
}
case ParseApiUserCallType.signUp:
{
return 'signUp';
}
case ParseApiUserCallType.login:
{
return 'login';
}
case ParseApiUserCallType.verificationEmailRequest:
{
return 'verificationEmailRequest';
}
case ParseApiUserCallType.requestPasswordReset:
{
return 'requestPasswordReset';
}
case ParseApiUserCallType.save:
{
return 'save';
}
case ParseApiUserCallType.destroy:
{
return 'destroy';
}
case ParseApiUserCallType.all:
{
return 'all';
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
import 'dart:async';
part of flutter_parse_sdk;

import 'package:http/http.dart' as http;
import 'package:http/http.dart';
import 'package:parse_server_sdk/data/parse_data_server.dart';

class ParseHTTPClient extends http.BaseClient {
final http.Client _client = new http.Client();
class ParseHTTPClient extends BaseClient {
final Client _client = new Client();
final String _userAgent = "Dart Parse SDK 0.1";
ParseDataServer data = ParseDataServer();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import "dart:convert";
import 'package:web_socket_channel/io.dart';
import 'package:parse_server_sdk/network/parse_http_client.dart';
import 'dart:io';
part of flutter_parse_sdk;

class LiveQuery {
final ParseHTTPClient client;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import 'dart:convert';

import 'package:parse_server_sdk/objects/parse_object.dart';
part of flutter_parse_sdk;

class QueryBuilder<T extends ParseObject> {

Expand Down Expand Up @@ -276,7 +274,7 @@ class QueryBuilder<T extends ParseObject> {
}

convertValueToCorrectType(dynamic value) {
if (value is int) return (value as num);
if (value is num) return value;
if (value is String) return "\"$value\"";
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import 'dart:convert';

import 'package:meta/meta.dart';
part of flutter_parse_sdk;

abstract class ParseBase {
Map _objectData;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import 'package:http/http.dart';
part of flutter_parse_sdk;

class ParseException {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import 'dart:convert';

import 'package:http/http.dart';
import 'package:parse_server_sdk/enums/parse_enum_function_call.dart';
import 'package:parse_server_sdk/network/parse_http_client.dart';
import 'package:parse_server_sdk/objects/parse_base.dart';
import 'package:parse_server_sdk/objects/parse_response.dart';
part of flutter_parse_sdk;

class ParseCloudFunction extends ParseBase {
final String functionName;
Expand All @@ -17,7 +11,7 @@ class ParseCloudFunction extends ParseBase {
client == null ? _client = ParseHTTPClient() : _client = client;

if (_debug == null) {
_client.data.debug != null ? _debug = _client.data.debug : false;
_client.data.debug != null ? _debug = _client.data.debug : _debug = false;
} else {
_debug = _debug;
}
Expand All @@ -41,7 +35,7 @@ class ParseCloudFunction extends ParseBase {
var responseString = ' \n';

responseString += "----"
"\n${_client.data.appName} API Response ($functionName : ${getEnumValue(type)}) :";
"\n${_client.data.appName} API Response ($functionName : ${ParseApiFunctionCallTypeUtil.getEnumValue(type)}) :";

if (parseResponse.success && parseResponse.result != null) {
responseString += "\nStatus Code: ${parseResponse.statusCode}";
Expand Down
Loading

0 comments on commit ddc25c6

Please sign in to comment.